I want to monitor upon a specified directory and if there's any file or subdirectory changes, I can be notified. I realize the function with the following simple code segment:
UINT myThreadFunc(LPVOID pParam)
{
int changeCount = 0;
while(true)
{
HANDLE changeHandle = FindFirstChangeNotification(L"C:\\", TRUE, FILE_NOTIFY_CHANGE_FILE_NAME);
WaitForSingleObject(changeHandle, INFINITE);
cout<<"A modifaction has occured"<<endl;
changeCount++;
if (changeCount >= 10)
break;
if ( FindNextChangeNotification( changeHandle ) == FALSE )
break;
}
bIsExit = TRUE;
return 0;
}
Now I want to retrieve the file information such as Action type or FileName. How can I get this information? I don't want to use ReadDirectoryChangesW function.
Thank you very much!