您的位置:首页 > 其它

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

IoRegisterFileSystem

IoRegisterFsRegistrationChangeEx

IoUnregisterFileSystem

IoUnregisterFsRegistrationChange
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: