Jump to content
  • Advertisement
Sign in to follow this  
brwarner

File Read/Write Hooks [C++]

This topic is 3370 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was looking through the SetWindowsHookEx documentation and some related reading but I could not find anything that can monitor file read/write operations, such as every time a file is opened or read or saved (most specifically I am looking for "open"). I have seen a program (I believe it's called procmon or something from sysinternals) that can do this. Does anyone know how (in C++ Windows API)?

Share this post


Link to post
Share on other sites
Advertisement
A window hook provides a way to intercept window related events. It's not surprising that you wouldn't find a way to monitor files using that approach.

FileMon probably uses a driver these days. The source code for an older version once floated on the web, a bit of heavy searching might turn something up. No guarantees with that. In the meantime, have you looked at FindFirstChangeNotification and related functions? Have you looked for shell functions to see if anything there fits? What about overlapped files and FileIOCompletionRoutine?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!