简体   繁体   English

在Windows中访问本地文件时获取通知

[英]Getting a notification when a local file is accessed in windows

I'd like to get notified when a specific file get accessed (AFAIK, most generally for a Userland code - by CreateFile() / NtCreateFile() ) 我想在访问特定文件时得到通知(AFAIK,最通常用于Userland代码-通过CreateFile() / NtCreateFile()

I already know about FileSystemWatcher which should do the same within the .NET environment, But I'm working in plain C + WinAPI . 我已经知道FileSystemWatcher ,它应该在.NET环境中执行相同的操作,但是我正在使用普通的C + WinAPI

As for the type of notification , raising a specified Event would be perfect, but sending a callback to be called , will also work. 至于通知的类型,引发指定的Event将是完美的,但是发送callback被称为也可以。

See FindFirstChangeNotification function in WinAPI and related links. 请参见WinAPI中的FindFirstChangeNotification函数和相关链接。

Alternatively, when functionality of that function is not enough, you can use a filesystem filter driver (write yours or use our CallbackFilter product). 或者,当该功能的功能还不够时,您可以使用文件系统过滤器驱动程序(编写您的驱动程序或使用我们的CallbackFilter产品)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Windows Flutter 上显示本地通知 - show local notification on Windows Flutter "尝试安装 msi 文件 (Node.js) 时无法访问 Windows Installer 服务" - Windows Installer Service could not be accessed when I tried to install a msi file (Node.js) 在Windows LAN上获取本地静态文件的标准URL - Getting the fully qualified URL for a local static file on a Windows LAN 检测使用java访问/读取文件时 - Detect When a file is accessed/read with java java中的“上次访问”vs“最后修改”文件日期(windows) - “last accessed” vs “last modified” file date in java (windows) 如何使文件创建,访问和修改日期与Windows属性相同? - How to get File Created, Accessed and Modified dates the same as windows properties? Windows编程:如何将经常访问的文件放入OS缓存中? - Windows Programming: How to put a file that is frequently accessed in the OS cache? 在Windows XP上复制文件时获取时间和日期 - Getting time and date when file was copied on Windows XP Windows Phone 8.1 javascript + html本地吐司通知 - Windows phone 8.1 javascript+html local toast notification Cygwin:创建 Windows 通知并在单击通知时聚焦程序 - Cygwin: Create a Windows notification and focus a program when the notification is clicked
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM