GetCurrentThread

This function returns a pseudohandle for the current thread.

HANDLE GetCurrentThread(void);

Return Values

A pseudohandle for the current thread indicates success.

Remarks

A pseudohandle is a special constant that is interpreted as the current thread handle. The calling thread can use this handle to specify itself whenever a thread handle is required.

This handle has the maximum possible access to the thread object.

The function cannot be used by one thread to create a handle that can be used by other threads to refer to the first thread. The handle is always interpreted as referring to the thread that is using it.

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

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Kfuncs.h   Nk.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CloseHandle, GetCurrentProcess, GetCurrentThreadId

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.