PDRIVER_FS_NOTIFICATION routine
PDRIVER_FS_NOTIFICATION-类型的例程在一个文件系统使用IoRegisterFileSystem 或 IoUnregisterFileSystem注册或者注销自己时被系统调用。
Syntax
DRIVER_FS_NOTIFICATION DriverNotificationRoutine;
VOID DriverNotificationRoutine(
_In_ struct _DEVICE_OBJECT *DeviceObject,
_In_ BOOLEAN FsActive
)
{ ... }
Parameters
DeviceObject [in]
指向文件系统设备对象的指针,系统为此文件系统设备对象调用通知例程。
FsActive [in]
注册(TRUE)或者注销(FALSE)作为一个活动的文件系统。
Return value
This routine does not return a value.
Remarks
必须使用DRIVER_FS_NOTIFICATION类型声明毁掉函数。更多见接下来的示例一节。
Examples
要定义一个名为MyDriverNotification的DriverFSNotificationRoutine 回调例程,首先你必须提供一个符合Static Driver Verify (SDV) 和其他验证工具需要的函数声明,如下所示:
DRIVER_FS_NOTIFICATION MyDriverFSNotification;
然后实现回调例程如下所示:
VOID
MyDriverFSNotification (
__in struct _DEVICE_OBJECT *DeviceObject,
__in BOOLEAN FsActive
)
{ . . . }
注意在Ntifs.h中回调类型的声明如下:
typedef
VOID
DRIVER_FS_NOTIFICATION (
__in struct _DEVICE_OBJECT *DeviceObject,
__in BOOLEAN FsActive
);
typedef DRIVER_FS_NOTIFICATION *PDRIVER_FS_NOTIFICATION;
Requirements
Target platform | Desktop |
Version | Available in Microsoft Windows 2000 and later versions of the Windows operating system. |
Header | Ntifs.h (include FltKernel.h or Ntifs.h) |
IRQL | PASSIVE_LEVEL |
See also
IoRegisterFsRegistrationChange
IoRegisterFsRegistrationChangeEx
IoRegisterFsRegistrationChangeMountAware
IoUnregisterFsRegistrationChange