This function removes a handle from a handle table.
*/
//即从一个句柄表中移除指定句柄.
EXHANDLE LocalHandle;
PETHREAD CurrentThread;
PVOID Object;
PAGED_CODE();
LocalHandle.GenericHandleOverlay = Handle;
CurrentThread = PsGetCurrentThread ();
//
// If the caller did not supply the optional handle table entry then
// locate the entry via the supplied handle, make sure it is real, and
// then lock the entry.
//
//
// If we are debugging handle operations then save away the details
//
if (HandleTable->DebugInfo != NULL) {
ExpUpdateDebugInfo(HandleTable, CurrentThread, Handle, HANDLE_TRACE_DB_CLOSE);
}
//
// At this point we have a locked handle table entry. Now mark it free
// which does the implicit unlock. The system will not allocate it
// again until we add it to the free list which we will do right after
// we take out the lock
//