The GetCurrentThreadId
function retrieves the identifier of the current thread. The thread identifier is a 64-bit value that is unique among all currently running threads. It is not the same as the thread's handle.
This function does not take any parameters.
The return value is the identifier of the calling thread.
To get a handle to the current thread, call the GetCurrentThread
function.
The thread identifier is assigned by the system and is guaranteed to be unique only for the lifetime of the calling process. It may be reused after the thread has terminated.
Component | Value |
---|---|
Minimum supported client | Windows 2000 Professional |
Minimum supported server | Windows 2000 Server |
Header | winbase.h (include windows.h ) |
Library | Kernel32.lib |
DLL | Kernel32.dll |