Last active
July 16, 2020 15:44
-
-
Save iljavs/04e12ad06529c25964d6fe73940136ca to your computer and use it in GitHub Desktop.
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
#include <windows.h> | |
#include <stdio.h> | |
int main() { | |
DWORD hcount = 0; | |
int end = 0; | |
printf("starting handle loop (this could take a while) "); | |
fflush(stdout); | |
while (!end) { | |
if (!(hcount % 10000)) { | |
printf("."); | |
fflush(stdout); | |
} | |
HANDLE h = CreateMutex(NULL, 0, NULL); | |
if (h == NULL) | |
end = 1; | |
else | |
hcount++; | |
} | |
printf("\nhandle count: %u\n", hcount); | |
exit(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment