IoRegisterFsRegistrationChange routine
2016-02-10 13:46
399 查看
IoRegisterFsRegistrationChange routine
IoRegisterFsRegistrationChange 例程注册一个文件过滤器驱动器的通知例程到文件系统上。当文件系统注册或者注销自身时调用这个通知例程。Syntax
NTSTATUS IoRegisterFsRegistrationChange(_In_ PDRIVER_OBJECT DriverObject,
_In_ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine
);
Parameters
DriverObject [in]指向文件系统过滤器驱动对象的指针。
DriverNotificationRoutine [in]
指向 PDRIVER_FS_NOTIFICATION 例程的指针,当文件系统注册或者注销自身时调用这个例程。
Return value
Return code | Description |
STATUS_SUCCESS | 通知例程成功注册。 |
STATUS_INSUFFICIENT_RESOURCES | 无法为通知例程创建一个通知包。 |
Remarks
IoRegisterFsRegistrationChange (往文件系统中)注册一个文件系统过滤器驱动程序以接收通知,当一个文件系统调用了 IoRegisterFileSystem orIoUnregisterFileSystem时。停止接收这些通知,文件过滤驱动程序应当调用IoUnregisterFsRegistrationChange。Note 在Microsoft Windows XP and 之后的版本中,当文件系统过滤器驱动程序调用了IoRegisterFsRegistrationChange时,他的通知例程同样立即被当前已注册的文件系统调用(那些已经调用了IoRegisterFileSystem 但尚未调用 IoUnregisterFileSystem的文件系统)。因为调用者的通知例程甚至可能在IoRegisterFsRegistrationChange 返回前被调用,因此在调用IoRegisterFsRegistrationChange 这个例程前务必创建好任何处理这些通知需要用到的数据结构。
另外,在in Windows XP and later的版本中,IoRegisterFsRegistrationChange 忽略RAW设备,有关根据名字附加到RAW设备的有关话题见Attaching the Filter Device Object to the Target Device Object.
IoRegisterFsRegistrationChange 增加文件过滤驱动程序的驱动对象的引用次数。
Note In Update Rollup for Windows 2000 Service Pack 4 (SP4), Windows XP Service Pack 2 (SP2), and Microsoft Windows Server 2003 SP1 and later, 如果一个文件系统过滤驱动程序接连调用了IoRegisterFsRegistrationChange 两次(中间没有调用callingIoUnregisterFsRegistrationChange )并传递相同的DriverObject and DriverNotificationRoutine。并且没有其他的文件过滤驱动程序自第一个调用后注册到文件系统中,那么IoRegisterFsRegistrationChange 返回STATUS_DEVICE_ALREADY_ATTACHED.
In Update Rollup for Windows 2000 SP4, 文件系统驱动程序可以使用IoRegisterFsRegistrationChangeEx 代替IoRegisterFsRegistrationChange. 在2000 sP4的IoRegisterFsRegistrationChangeEx 的效果等同于 Windows XP and later.的ofIoRegisterFsRegistrationChange
Requirements
Target platform | Universal |
Header | Ntifs.h (include Ntifs.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | < DISPATCH_LEVEL |
See also
IoRegisterFileSystemIoRegisterFsRegistrationChangeEx
IoUnregisterFileSystem
IoUnregisterFsRegistrationChange
相关文章推荐
- 如何创建一个完整的C语言程序心得
- C/C++,笔试面试,多种方法求100以内的所有素数
- PHP---APP笔记
- 百岁老人(有照片)
- HDU——2056Rectangles(几何计算)
- 2016蓝桥杯算法训练——未名湖边的烦恼
- DP项目开发随记6-僵直
- Light OJ 1079 Just another Robbery (概率+背包)
- 1023. 组个最小数 (20)
- 设置MyEclipse中代码的换行长度
- cocos2d-x3.3 PageView常用成员函数
- Java认证考试实例疑难辨析(4)
- 顺序表应用3:元素位置互换之移位算法
- 在SWING里嵌入SWT的组件
- 326. Power of Three LeetCode
- 2016蓝桥杯算法训练——数字三角形
- 202. Happy Number LeetCode
- js对象、数组转换字符串
- 如何设计Kafka?
- 2015年总结