PDRIVER_FS_NOTIFICATION routine

A PDRIVER_FS_NOTIFICATION-typed routine is called by the operating system when a file system registers or unregisters itself by using IoRegisterFileSystem or IoUnregisterFileSystem.

Syntax


DRIVER_FS_NOTIFICATION DriverNotificationRoutine;

VOID  DriverNotificationRoutine(
  _In_ struct _DEVICE_OBJECT *DeviceObject,
  _In_ BOOLEAN               FsActive
)
{ ... }

Parameters

DeviceObject [in]

A pointer to a file system device object for which the notification was called.

FsActive [in]

A Boolean value that indicates whether the file system has registered (TRUE) or unregistered (FALSE) itself as an active file system.

Return value

This routine does not return a value.

Remarks

You must declare the callback function by using the DRIVER_FS_NOTIFICATION type. For more information, see the following Example section.

Examples

To define a DriverFSNotificationRoutine callback routine that is named MyDriverNotification, you must first provide a function declaration that the Static Driver Verify (SDV) and other verification tools require, as follows:


DRIVER_FS_NOTIFICATION MyDriverFSNotification;

And then implement your callback routine as follows:


VOID
MyDriverFSNotification (
    __in struct _DEVICE_OBJECT *DeviceObject,
    __in BOOLEAN FsActive
)
{ . . . }

Note that the callback type is declared in Ntifs.h as follows:


typedef
VOID
DRIVER_FS_NOTIFICATION (
  __in struct _DEVICE_OBJECT *DeviceObject,
  __in BOOLEAN FsActive
  );
typedef DRIVER_FS_NOTIFICATION *PDRIVER_FS_NOTIFICATION;

Requirements

Target platform

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

 

 

Send comments about this topic to Microsoft

Show: