IoSetDeviceToVerify function (ntifs.h)

The IoSetDeviceToVerify routine sets the device object to be verified in the specified thread. The specified device object represents a removable media device.

Syntax

void IoSetDeviceToVerify(
  [in]           PETHREAD       Thread,
  [in, optional] PDEVICE_OBJECT DeviceObject
);

Parameters

[in] Thread

Pointer to an ETHREAD thread object structure for the thread.

[in, optional] DeviceObject

Pointer to a DEVICE_OBJECT structure that identifies the device object for a removable-media device. DeviceObject can be NULL.

Return value

None

Remarks

Before using IoSetDeviceToVerify and IoVerifyVolume, driver writers should study the way these routines are used in the FASTFAT sample. For additional information, see also Supporting Removable Media.

IoSetDeviceToVerify is called to indicate that a given device object, representing a removable-media device, needs to be verified. Call IoGetDeviceToVerify to obtain the device object that is the target of the given thread's I/O request.

A file system driver must verify a volume when it receives notification from an underlying removable-media device driver that the media appears to have changed since the last access to the target device. The file system typically calls IoSetDeviceToVerify and IoVerifyVolume when the lower device returns STATUS_VERIFY_REQUIRED.

Requirements

Requirement Value
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL
DDI compliance rules IrqlIoDispatch(wdm)

See also

IRP

IoGetDeviceToVerify

IoVerifyVolume

PsGetCurrentThread