DRIVER_FS_NOTIFICATION callback function (ntifs.h)
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 DriverFsNotification;
void DriverFsNotification(
[in] _DEVICE_OBJECT *DeviceObject,
[in] BOOLEAN FsActive
)
{...}
Parameters
[in] DeviceObject
A pointer to a file system device object for which the notification was called.
[in] FsActive
A Boolean value that indicates whether the file system has registered (TRUE) or unregistered (FALSE) itself as an active file system.
Return value
None
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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 |
Target Platform | Desktop |
Header | ntifs.h (include FltKernel.h, Ntifs.h) |
IRQL | PASSIVE_LEVEL |
See also
IoRegisterFsRegistrationChange
IoRegisterFsRegistrationChangeEx