static void CloseHandle(Handle Object)
This function closes the handle of an object.
The handle of the object being closed.
This function is capable of closing handles of the following object types.
The object handle is invalidated. The object's handle count is decremented and retention checks are performed. When the last handle to an object is closed, the object is removed.
A thread object is removed only when
An error is returned when an attempt is made to close an invalid handle.