IOCTL_MOUNTMGR_CHANGE_NOTIFY - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTIOAPI_H

#define IOCTL_MOUNTMGR_CHANGE_NOTIFY                CTL_CODE(MOUNTMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)

#endif

View code on GitHub
// mountmgr.h

// CTL_CODE(0x006d, 0x008, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_MOUNTMGR_CHANGE_NOTIFY 0x006D4020
View the official Windows Driver Kit DDI reference

NtDoc

This IOCTL is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (ni-mountmgr-ioctl_mountmgr_change_notify)

Description

Clients send this IOCTL to the mount manager to be informed whenever there is a change in the mount manager's persistent symbolic link name database.

The mount manager maintains a counter called EpicNumber that records how many changes have occurred in its persistent name database since the last startup. Clients send a number to the mount manager with every change notification request IRP, and the mount manager responds in the following manner:

A client that only wants to be informed of the changes to a particular volume is advised to register for Plug and Play target device notification and watch for GUID_IO_VOLUME_NAME_CHANGE.

Parameters

Major code

IRP_MJ_DEVICE_CONTROL

Input buffer

The mount manager client initializes the MOUNTMGR_CHANGE_NOTIFY_INFO structure at the beginning of the buffer at Irp->AssociatedIrp.SystemBuffer.

Input buffer length

Parameters.DeviceIoControl.InputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the input buffer, which must be greater than or equal to sizeof(MOUNTMGR_CHANGE_NOTIFY_INFO).

Output buffer

The mount manager returns the current EpicNumber in the MOUNTMGR_CHANGE_NOTIFY_INFO structure at the beginning of the buffer at Irp->AssociatedIrp.SystemBuffer.

Output buffer length

None.

Input/output buffer

N/A

Input/output buffer length

N/A

Status block

If the operation is successful, the Status field is set to STATUS_SUCCESS and the Information field is set to sizeof(MOUNTMGR_CHANGE_NOTIFY_INFO).

If InputBufferLength is less than sizeof(MOUNTMGR_CHANGE_NOTIFY_INFO) or OutputBufferLength is less than sizeof(MOUNTMGR_CHANGE_NOTIFY_INFO), the Status field is set to STATUS_INVALID_PARAMETER.

Remarks

For more information, see Supporting Mount Manager Requests in a Storage Class Driver.

See also

MOUNTMGR_CHANGE_NOTIFY_INFO