<p>I'm new to windows programming and I'm trying to get notified of all changes to the file system (similar to the information that FileMon from SysInternals displays, but via an API). Is a FindFirstChangeNotification for each (non-network, non-substed) drive my best bet or are there other more suitable C/C++ APIs?</p>

[{'answer_id': 16691, 'author': 'TheSmurf', 'author_id': 1975282, 'author_profile': 'https://Stackoverflow.com/users/1975282', 'pm_score': 0, 'selected': False, 'text': "<p>There are other ways to do it, but most of them involve effort on your part (or take performance from your app, or you have to block a thread to use them, etc). FindFirstChangeNotification is a bit complicated if you're not used to dealing with function pointers, etc, but it has the virtue of getting the OS to do the bulk of the work for you.</p>\n"}, {'answer_id': 22910, 'author': 'Mat Noguchi', 'author_id': 1799, 'author_profile': 'https://Stackoverflow.com/users/1799', 'pm_score': 6, 'selected': True, 'text': '<p><code>FindFirstChangeNotification</code> is fine, but for slightly more ultimate power you should be using <code>ReadDirectoryChangesW.</code> (In fact, it\'s even recommended in the documentation!)</p>\n\n<p>It doesn\'t require a function pointer, it does require you to manually decode a raw buffer, it uses Unicode file names, but it is generally better and more flexible.</p>\n\n<p>On the other hand, if you want to do what FileMon does, you should probably do what FileMon does and use <a href="http://msdn.microsoft.com/en-us/library/ms790748.aspx" rel="noreferrer">IFS to create and install a file system filter</a>.</p>\n'}, {'answer_id': 981234, 'author': 'UBpine Inc', 'author_id': 113023, 'author_profile': 'https://Stackoverflow.com/users/113023', 'pm_score': -1, 'selected': False, 'text': '<p>You can use FileSystemWatcher class. Very efficient but cannot work with Network shared drives.</p>\n'}, {'answer_id': 1307609, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Actually FileSystemWatcher works perfectly with shared network drives. I am using it right now in an application which, among other things, monitors the file system for changes. (www.tabbles.net).</p>\n'}]
['https://Stackoverflow.com/questions/16615', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1849/']