DRIVER_FS_NOTIFICATION - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntifs.h

DRIVER_FS_NOTIFICATION DriverFsNotification;

VOID DriverFsNotification(
  [in] _DEVICE_OBJECT *DeviceObject,
  [in] BOOLEAN FsActive
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-ntifs-driver_fs_notification)

DRIVER_FS_NOTIFICATION callback function

Description

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.

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.

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;

See also

IoRegisterFsRegistrationChange

IoRegisterFsRegistrationChangeEx

IoRegisterFsRegistrationChangeMountAware

IoUnregisterFsRegistrationChange