IoVerifyVolume function (ntifs.h)
IoVerifyVolume sends a volume verify request to the specified removable-media device identified by the device object.
Syntax
NTSTATUS IoVerifyVolume(
[in] PDEVICE_OBJECT DeviceObject,
[in] BOOLEAN AllowRawMount
);
Parameters
[in] DeviceObject
Pointer to a DEVICE_OBJECT structure that identifies the device object for the device on which the volume is to be verified/mounted.
[in] AllowRawMount
A value of TRUE indicates that this verify request is being issued on behalf of a DASD (direct-access storage device) open request, which indicates that a raw mount should be performed if the verify request fails.
Return value
IoVerifyVolume returns the NTSTATUS code from the verify operation, which might be one of the following values:
Return code | Description |
---|---|
STATUS_SUCCESS | IoVerifyVolume determined that the volume has not changed or was not previously mounted. |
STATUS_INSUFFICIENT_RESOURCES | Insufficient system resources exist to complete the operation. |
STATUS_UNSUCCESSFUL | The verify operation was unsuccessful. |
STATUS_WRONG_VOLUME | The volume has changed. |
Remarks
Before using IoSetDeviceToVerify and IoVerifyVolume, driver writers should study the way these routines are used in the FASTFAT sample.
IoVerifyVolume is called to check a mounted volume on the specified device when it appears that the volume might have changed since it was last accessed. A file system driver typically calls IoSetDeviceToVerify and IoVerifyVolume when the lower device returns STATUS_VERIFY_REQUIRED.
If the DeviceObject has a mounted volume, IoVerifyVolume checks whether the volume has changed.
If the volume has changed or has not previously been mounted, IoVerifyVolume sends a volume mount request to the device.
For more information about removable-media devices, see Supporting Removable Media.
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Header | ntifs.h (include Ntifs.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | < DISPATCH_LEVEL |