PDRIVER_FS_NOTIFICATION routine

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

要定义一个名为MyDriverNotificationDriverFSNotificationRoutine 回调例程,首先你必须提供一个符合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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值