Red Gate forums :: View topic - Monitor File Open, Save and Close events on Windows
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
PInvoke.Net
PInvoke.Net forum

Monitor File Open, Save and Close events on Windows

Search in PInvoke.Net forum
Post new topic   Reply to topic
Jump to:  
Author Message
Sumant



Joined: 19 Mar 2014
Posts: 1

PostPosted: Wed Mar 19, 2014 5:37 am    Post subject: Monitor File Open, Save and Close events on Windows Reply with quote

I have a somewhat unique requirement where I need to track or monitor file open, save or close events and log the timestamp to a file or database. File could be either on the local machine or on a shared path. OS is Windows 7.

I have tried using the WMI events subscription for process creation, modification and deletion. However it works only for file types like notepad because it creates a new process for each file while Office files are managed through a single process. I stumbled across the NetFileEnum function which provides a list of files opened from a shared path. Is there a similar function which provides a list of files opened from local machine?

I am thinking if I dont get the events I have to use the polling mechanism which will run every few mins and keep checking for open and closed files. Win32 API seems to be the only option. FileWatcher does not help.

Please provide your valuable suggestions
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group