Created
August 13, 2019 15:15
-
-
Save SouhailHammou/fd307db4e7c079d2e0448bc889ed346d to your computer and use it in GitHub Desktop.
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
#include <Windows.h> | |
#define NTHREADS 5 | |
DWORD WINAPI Thread(LPVOID Parameter) | |
{ | |
while (1) | |
CloseHandle(FindFirstChangeNotificationA("C:\\", FALSE, FILE_NOTIFY_CHANGE_FILE_NAME)); | |
} | |
void main() | |
{ | |
HANDLE hLastThread; | |
for(int i = 0; i < NTHREADS; i++) | |
hLastThread = CreateThread(NULL, 0, Thread, NULL, 0, 0); | |
WaitForSingleObject(hLastThread, INFINITE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment