Development/C/C++
쓰레드 ID 가져오기 : GetCurrentThreadId()
키르히아이스
2011. 8. 13. 15:03
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.
Example Code
For an example, see Using Thread Local Storage.
Requirements
Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, and Windows 95.
Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT Server.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
See Also
Processes and Threads Overview, Process and Thread Functions, GetCurrentThread, OpenThread