Last active
December 26, 2015 15:29
-
-
Save okumura/7173506 to your computer and use it in GitHub Desktop.
Get Process ID for Windows.
This file contains 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 mw32GetPID() { | |
#if defined(_M_X64) | |
return __readgsdword(0x40); | |
#else | |
return __readfsdword(0x20); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment