954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Monitering Filechnages in HardDrive ( C++ ).

I have implement a desktop lookup mechanism . Indexing and retrival works fine. But when a file is updated , created or deleted i would like to get the notifaction so that i can update my index . Is there any C++ code availabe for FileSystemWatcher ( which is in C#).
Thanks in advance

Aashath
Newbie Poster
18 posts since Dec 2007
Reputation Points: 11
Solved Threads: 5
 

This c++ code also uses FileSystemWatcher

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

FileSystemWatcher (in CLR) uses the win32 api functions FindFirstChangeNotification and FindNextChangeNotification http://msdn2.microsoft.com/en-us/library/aa364417.aspx along with a wait function to get notifications of changes. to retrieve information about the changes, you coud use ReadDirectoryChangesW http://msdn2.microsoft.com/en-us/library/aa365465(VS.85).aspx

vijayan121
Posting Virtuoso
1,606 posts since Dec 2006
Reputation Points: 1,159
Solved Threads: 287
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You