IoGetDeviceToVerify

PDEVICE_OBJECT
IoGetDeviceToVerify(

IN PETHREAD Thread
);

IoGetDeviceToVerify returns a pointer to the device object, representing a removable-media device, that is the target of the given thread’s I/O request.

Return Value

IoGetDeviceToVerify returns a pointer to the device object representing a device on which the media should be verified, or it returns NULL.

Parameters

Thread

Points to the thread for which a highest-level driver is attempting to verify the validity of the media on which the thread has opened a file.

Comments

In general, highest-level drivers, particularly file systems, are most likely to call this routine.

An underlying removable-media device driver is responsible for notifying higher-level drivers, particularly the file system, when the media appears to have changed since the last access to the target device. For more information about handling removable media, see the Kernel-Mode Driver Design Guide.

Callers of IoGetDeviceToVerify must be running at IRQL PASSIVE_LEVEL.

See Also

IoIsErrorUserInduced, IoSetHardErrorOrVerifyDevice, PsGetCurrentThread