Link to home
Start Free TrialLog in
Avatar of npatel
npatel

asked on

Log file access

In my app, I need to monitor and log all disk/CD access's for any files written or read. How can I do this without writing Vxd drivers in C++ ?.
Avatar of BlackMan
BlackMan

There is an example here with source (in C i guess). But you can properly find the relevant APIs
http://www.sysinternals.com/ntfilmon.htm
Look at the WIN32API FindFirstChangeNotification, this will however NOT log open/read of files (works on 95/NT).
If you plan to use Windows NT only, you can use a device driver as BlackMan writes, another way would be to use the security functions, and set the file objects to audit changes.

Any comment ?
ASKER CERTIFIED SOLUTION
Avatar of jeurk
jeurk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmm, jeurk, apart from your wrong URL (ntinternals was their former address), that's just what I suggested...
Avatar of npatel

ASKER

Thanks,

The source code from filemon is a good start. The FindFirstChangeNotification will give an indication of file access in the system, but as KC mentioned no file Logging. I do however perfer examples in Delphi, of course.

Humm...
How can I say, I did not see your suggestion BlackMan... I'm sorry, really
I'm not that kind of guy. If you want I can ask a question for you to answer ? to give
you back the points. OK ?
No, that's all right, maybe I can steal your suggestion another time :-)
No hard feelings...
Ok !
Anyway I apologize again.