阅读:1444回复:2
IoRegisterFsRegistrationChange()这个函数在哪里?
在下是文件驱动的新手,今天在学习的时候编译时发现IoRegisterFsRegistrationChange()未定义,
请问IoRegisterFsRegistrationChange()在哪个头文件里呢?不是ntddk.h吗?为什么我的ntddk.h没有这个函数的? 我用的是WinXP DDK(2600). 望各位高手解答,谢谢! |
|
沙发#
发布于:2007-10-11 02:22
Headers
Declared in ntifs.h. Include ntifs.h. 您需要ifs ddk或者wdk,应该是有的,直接的ddk好象没有这东西吧,我也不知道了 IoRegisterFsRegistrationChange The IoRegisterFsRegistrationChange routine registers a file system filter driver's notification routine to be called whenever a file system registers or unregisters itself as an active file system. NTSTATUS IoRegisterFsRegistrationChange( IN PDRIVER_OBJECT DriverObject, IN PDRIVER_FS_NOTIFICATION DriverNotificationRoutine ); Parameters DriverObject Pointer to the driver object for the file system filter driver. DriverNotificationRoutine Address of the routine to call when a file system registers or unregisters itself. This routine is defined as follows: VOID (*PDRIVER_FS_NOTIFICATION) ( IN struct _DEVICE_OBJECT *DeviceObject, IN BOOLEAN FsActive ); Return Value STATUS_SUCCESS The notification routine was successfully registered. STATUS_INSUFFICIENT_RESOURCES A notification packet could not be allocated for the notification routine. Headers Declared in ntifs.h. Include ntifs.h. Comments IoRegisterFsRegistrationChange registers a file system filter driver to be notified whenever a file system calls IoRegisterFileSystem or IoUnregisterFileSystem. To stop receiving such notifications, the filter driver should call IoUnregisterFsRegistrationChange. Note In Microsoft Windows XP and later, when a file system filter driver calls IoRegisterFsRegistrationChange, its notification routine is also called immediately for all currently registered file systems (that is, file systems that have already called IoRegisterFileSystem but have not yet called IoUnregisterFileSystem). Because the caller's notification routine can be called even before IoRegisterFsRegistrationChange returns, a filter driver should not call this routine until after it has created any data structures that it needs in order to process these notifications. Additionally, in Windows XP and later, IoRegisterFsRegistrationChange ignores RAW devices. For information about attaching to the RAW file system by name, see Attaching the Filter Device Object to the Target Device Object. IoRegisterFsRegistrationChange increments the reference count on the filter driver's driver object. Note In Microsoft Windows Server 2003 SP1 and later, if a file system filter driver calls IoRegisterFsRegistrationChange twice in succession (without calling IoUnregisterFsRegistrationChange in between), passing the same values for the DriverObject and DriverNotificationRoutine that it registered in the previous call to IoRegisterFsRegistrationChange, and no other filter drivers have registered since the first call, IoRegisterFsRegistrationChange returns STATUS_DEVICE_ALREADY_ATTACHED. Callers of IoRegisterFsRegistrationChange must be running at IRQL < DISPATCH_LEVEL. See Also IoRegisterFileSystem, IoUnregisterFileSystem, IoUnregisterFsRegistrationChange ? Microsoft Corporation Built on Friday, February 18, 2005 |
|
|
板凳#
发布于:2007-10-11 11:17
实际上是把你的回调函数加入到IopFsNotifyChangeQueueHead这个全局链表里面
|
|