WDF_IO_TYPE_CONFIG structure (wdfdevice.h)

[Applies to KMDF and UMDF]

The WDF_IO_TYPE_CONFIG structure specifies the driver's preferred buffer access method for read and write requests, and for device I/O control requests.

Syntax

typedef struct _WDF_IO_TYPE_CONFIG {
  ULONG              Size;
  WDF_DEVICE_IO_TYPE ReadWriteIoType;
  WDF_DEVICE_IO_TYPE DeviceControlIoType;
  ULONG              DirectTransferThreshold;
} WDF_IO_TYPE_CONFIG, *PWDF_IO_TYPE_CONFIG;

Members

Size

Size of this structure in bytes.

ReadWriteIoType

KMDF 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.

UMDF A WDF_DEVICE_IO_TYPE-typed enumerator that identifies the method that you prefer the driver use to access data buffers of read and write requests. Valid values include WdfDeviceIoBuffered and WdfDeviceIoDirect.

DeviceControlIoType

This member does not apply to KMDF.

UMDF A WDF_DEVICE_IO_TYPE-typed enumerator that identifies the method that you prefer the driver use for the data buffers of IOCTL requests. Valid values include WdfDeviceIoBuffered and WdfDeviceIoDirect.

DirectTransferThreshold

This member does not apply to KMDF.

UMDF An optional value that specifies the smallest buffer size, in bytes, for which the framework will use direct I/O for a device. For example, set DirectTransferThreshold to 12288 to indicate that the framework should use buffered I/O for all buffers that are smaller than 12 kilobytes, and direct I/O for buffers that are equal to or larger than 12 kilobytes. Typically, you do not need to provide this value because the framework uses settings that provide the best performance.

Remarks

The WDF_IO_TYPE_CONFIG structure is used as input to the WdfDeviceInitSetIoTypeEx method.

To initialize a WDF_IO_TYPE_CONFIG structure, your driver should call WDF_IO_TYPE_CONFIG_INIT.

If you are writing a driver using UMDF version 2.0 or later, see Managing Buffer Access Methods in UMDF Drivers for more information about specifying preferred buffer access methods.

If you are writing a driver using UMDF version 1.x, your driver calls IWDFDeviceInitialize2::SetIoTypePreference to specify preferred buffer access methods.

Requirements

Requirement Value
Minimum KMDF version 1.13
Minimum UMDF version 2.0
Header wdfdevice.h (include Wdf.h)

See also

WDF_DEVICE_IO_TYPE

WDF_IO_TYPE_CONFIG_INIT

WdfDeviceInitSetIoTypeEx