I am using this implementation of ReadDirectoryChangesW to monitor changes to the desktop. My program plans to run some small program when a file is created on the desktop.
Now the problem I am running into is when I create a new shortcut via the right click context menu ReadDirectoryChangesW gets a notification saying the file has been created, but right after it gets another notification saying the file has been deleted. I have been running into this problem since Windows Vista.
Anyone have any idea what could be wrong? Is there another function I should be using to monitor directory changes specific to Vista and 7?
Thanks, Krishna
I managed to resolve this issue. I still don't know why I am getting all those strange ReadDirectyChangesW events but I got my end result so I am leaving this question be.
Thanks for all the help.