ReadDirectoryChangesW 实现
最初,我链接到此调用,以便我可以记录对某个文件的所有访问并捕获对其的所有更改。
我已经完成了几个例子,但都失败了。 即使 msdn 代码也无法为我编译。
有人可以为我提供一个小的工作片段来监视文件并记录更改吗?
或者至少有一些指示?
谢谢
Originally I was linked to this call so I could log all access to a certain file and capture all the changes to it.
I have worked through several examples and have failed. Even the msdn code doesn't compile for me.
Can someone provide me with a small working snippet to monitor a file and record changes?
Or at least some pointers?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能没有声明
ReadDirectoryChangesW
的标头,或者需要#define _WIN32_WINNT
大于或等于0x0400
。 如果是前者,您可以手动获取 ReadDirectoryChangesW 的地址并调用:You might not have the header that declares
ReadDirectoryChangesW
, or you need to#define _WIN32_WINNT
as greater than or equal to0x0400
. If it's the former, you can manually get the address to ReadDirectoryChangesW and call that: