GetCurrentThread

  HANDLE GetCurrentThread(VOID)    

The GetCurrentThread. function returns a pseudo handle for the current thread.

Parameters

This function has no parameters.

Return Value

The return value is the pseudo handle of the current thread.

Comments

A pseudo handle is a special constant exported by Win32 that is interpreted as a handle to the current thread. This handle may be used to specify the current thread whenever a thread handle is required. On DOS/Win32, this handle has THREAD_ALL_ACCESS to the current thread. On NT/Win32, this handle has the maximum access allowed by any security descriptor placed on the current thread.

This handle need not be closed when it is no longer needed. Calling the CloseHandle function with this handle has no effect.

See Also

GetCurrentProcess, GetCurrentThreadId