Dave’s Brain
Home
Search
Browse
Recent
Keywords
Other sites
Feedback
Sign in
Random
Crawlers
Programming Tips
- Win32: How to obtain the handle of the current thread?
Date:
2008jul29
Update:
2025oct23
Platform:
win32
Language:
C/C++
Q.
Win32: How to obtain the handle of the current thread?
A.
Use GetCurrentThread() like this:
HANDLE
h
=
GetCurrentThread
();
To get the current thread ID do this:
DWORD
id
=
GetCurrentThreadId
();