IOCTL_MOUNTMGR_CHANGE_NOTIFY IOCTL (mountmgr.h)
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:
- If the number supplied by the client is not equal to EpicNumber, the mount manager returns STATUS_SUCCESS, indicating that changes have occurred since the client last compared its number with the mount manager's EpicNumber.
- If the number supplied by the client is equal to EpicNumber, the mount manager interprets this as a request to be informed of the next change to the persistent name database, and it queues the change notification IRP and returns STATUS_PENDING. Whenever a change occurs in the database, the mount manager completes all of the pending change notification IRPs, thereby informing clients of the change.
Major code
Input buffer
The mount manager client initializes the MOUNTMGR_CHANGE_NOTIFY_INFO structure, defined in Mountmgr.h, 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, defined in Mountmgr.h, at the beginning of the buffer at Irp->AssociatedIrp.SystemBuffer.
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.
Requirements
Requirement | Value |
---|---|
Header | mountmgr.h (include Mountmgr.h) |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for