• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 141
  • Last Modified:

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++ ?.
0
npatel
Asked:
npatel
  • 3
  • 3
  • 2
  • +1
1 Solution
 
BlackManCommented:
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
0
 
KECommented:
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.

0
 
KECommented:
Any comment ?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
jeurkCommented:
Hi,
I think that this cannot be done without some vxd programming.
A solution would be to get an already written vxd that does the job.
look at the following site : www.ntinternals.com in the 95 or the NT section
for a program called filemon it does the job you ask. it's free and has the sources
in C++.
Should be a good begin.
0
 
BlackManCommented:
Hmm, jeurk, apart from your wrong URL (ntinternals was their former address), that's just what I suggested...
0
 
npatelAuthor Commented:
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.

0
 
jeurkCommented:
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 ?
0
 
BlackManCommented:
No, that's all right, maybe I can steal your suggestion another time :-)
No hard feelings...
0
 
jeurkCommented:
Ok !
Anyway I apologize again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now