Platform SDK: DLLs, Processes, and Threads

GetCurrentThreadId

The GetCurrentThreadId function retrieves the thread identifier of the calling thread.

DWORD GetCurrentThreadId(VOID);

Parameters

This function has no parameters.

Return Values

The return value is the thread identifier of the calling thread.

Remarks

Until the thread terminates, the thread identifier uniquely identifies the thread throughout the system.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Kernel32.lib.

See Also

Processes and Threads Overview, Process and Thread Functions, GetCurrentThread, OpenThread