3

我想记录我从特定网络共享访问的所有文件的名称(以及访问该文件的进程)。

C++ / Win32 中的解决方案最好是什么?

4

3 回答 3

2

You need ReadDirectoryChangesW and the FILE_NOTIFY_CHANGE_LAST_ACCESS notification flag.

I don't think the old FindFirstChangeNotification will work for you as it only notifies on changes, not access, but I've traditionally used that for file/directory notifications.

于 2008-11-13T23:34:05.570 回答
1

来自 sysinternals.com 的 Process Monitor 可以设置为过滤路径。您可以设置您有兴趣观看的 UNC 的路径。

http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

于 2008-11-18T22:44:55.247 回答
0

如果是事后处理,你可以使用Windows 的安全审计

如果您需要实时执行此操作,则可能需要与Windows 消息队列交互并嗅探您感兴趣的特定事件。

于 2012-01-18T21:06:37.253 回答