For example if anyone just visited(and not making any changes) E:\Documents how can i detect that ? i tried ReadDirectoryChanges() but it detects changes only if something is modified inside the folder.
What do you mean by "visit"? Is this with Explorer? Or??
ReadDirectoryChanges (sort of) works for me -- with FILE_NOTIFY_CHANGE_LAST_ACCESS -- when I use Explorer to visit the folder (as it looks at one of the files, when it changes to a new folder?), but not if I use the console (i.e. cd to directory and use dir.)
By "visit" i mean if anyone tries to see the content of the directory (list files and folders, for example if i double click on folder and see whats inside from explorer or dir (or cd [target folder] ) command from console).
i tried FILE_NOTIFY_CHANGE_LAST_ACCESS, it was not showing any notification when i accessed the target folder from explorer or console.
When I navigated to a folder using Explorer, my test program was detecting something's happened. But I now see it's because something (my virus scanner?) is checking the binary files which are found there, not because of the change of folder.
I used a folder where I keep all my test apps for the testing, which was a mistake. Using a different folder which just contains text files, the app doesn't trigger.
So, unfortuately, I don't have the "fix" I hoped I had! :-(