Last active
December 26, 2015 15:29
-
-
Save okumura/7173498 to your computer and use it in GitHub Desktop.
Get Thread ID for Windows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned int mw32GetTID() { | |
#if defined(_M_X64) | |
return __readgsdword(0x48); | |
#else | |
return __readfsdword(0x24); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment