WdfDeviceInitSetIoType function (wdfdevice.h)
[Applies to KMDF and UMDF]
The WdfDeviceInitSetIoType method sets the method or preference for how a driver will access the data buffers that are included in read and write requests for a specified device.
void WdfDeviceInitSetIoType( PWDFDEVICE_INIT DeviceInit, WDF_DEVICE_IO_TYPE IoType );
[in] A pointer to a WDFDEVICE_INIT structure.
[in] A WDF_DEVICE_IO_TYPE-typed enumerator that identifies the method that the driver will use to access data buffers that it receives for read and write requests.
KMDF If you are writing a new driver using KMDF version 1.13 or later, you should instead use WdfDeviceInitSetIoTypeEx. Calling WdfDeviceInitSetIoType from a KMDF filter driver has no effect. For filter drivers, the framework uses the I/O type specified by the next-lower driver in the driver stack.
UMDF If you are converting a KMDF driver that calls WdfDeviceInitSetIoType to UMDF version 2.0 or later, your converted driver can continue to call WdfDeviceInitSetIoType without issue. However, if you are writing an entirely new driver using UMDF version 2.0 or later, you should instead use WdfDeviceInitSetIoTypeEx.
If the driver does not call WdfDeviceInitSetIoType, the framework sets the driver's buffer-access method to WdfDeviceIoBuffered, for the specified device.
For more information about buffer-access methods, see Accessing Data Buffers.
The following code example indicates that a driver will use the direct I/O method when it accesses the device.
WdfDeviceInitSetIoType( DeviceInit, WdfDeviceIoDirect );
|Minimum KMDF version||1.0|
|Minimum UMDF version||2.0|
|Header||wdfdevice.h (include Wdf.h)|
|Library||Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)|
|DDI compliance rules||ChildDeviceInitAPI, ControlDeviceInitAPI, DeviceInitAPI, DriverCreate, KmdfIrql, KmdfIrql2, PdoDeviceInitAPI|