IoGetDeviceToVerify function (ntifs.h)

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

Syntax

PDEVICE_OBJECT IoGetDeviceToVerify(
  [in] PETHREAD Thread
);

Parameters

[in] Thread

Pointer to an ETHREAD structure whose device object is being queried. That is, Thread is 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.

Return value

IoGetDeviceToVerify returns a pointer to a DEVICE_OBJECT structure that identifies the device object representing a device on which the media should be verified. This function can return NULL.

Remarks

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, see Notifying the File System of Possible Media Changes.

Requirements

Requirement Value
Minimum supported client Windows 2000
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport), IrqlIoDispatch(wdm), PowerIrpDDis(wdm)

See also

IoIsErrorUserInduced

IoSetDeviceToVerify

IoSetHardErrorOrVerifyDevice

PsGetCurrentThread