[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]

The WDF_DEVICE_IO_TYPE enumeration is used to specify a method for accessing data buffers.


typedef enum _WDF_DEVICE_IO_TYPE { 
  WdfDeviceIoUndefined         = 0x00,
  WdfDeviceIoNeither           = 0x01,
  WdfDeviceIoBuffered          = 0x02,
  WdfDeviceIoDirect            = 0x03,
  WdfDeviceIoBufferedOrDirect  = 0x04,
  WdfDeviceIoMaximum           = 0x5



Reserved for system use.


Reserved for system use.


UMDF and the driver use buffered I/O to access data buffers.


UMDF and the driver use direct I/O to access data buffers.


UMDF and the driver can use either buffered I/O or direct I/O to access data buffers.


Reserved for system use.


The WDF_DEVICE_IO_TYPE enumeration is used as input to IWDFDeviceInitialize2::SetIoTypePreference and as output from IWDFIoRequest2::GetEffectiveIoType.

You should use the following guidelines when choosing an I/O type for your driver:

  • Buffered I/O provides the best security and reliability, because applications and drivers access separate copies of the data. In addition, buffered I/O provides the best performance if most of the data transfers are relatively small (typically two memory pages or less).

  • Direct I/O provides the best performance if most I/O requests transfer large amounts of data. However, applications and drivers access a single copy of the data. Therefore, the driver must copy application-specified parameters to local driver memory before it validates the parameters to ensure that the application does not modify the parameters after validation. If the driver must validate large amounts of application data, buffered I/O might be a better choice because the driver does not have to copy the data before validating it.

  • Typically, a filter driver that can reside in several driver stacks and performs little processing of application data can support both buffered I/O and direct I/O and therefore can specify WdfDeviceIoBufferedOrDirect. However, if the driver validates application-specified parameters it must copy them first when direct I/O is used.

For more information about accessing an I/O request's data buffers, see Accessing Data Buffers in UMDF-Based Drivers.

For the KMDF version of this enumeration, see WDF_DEVICE_IO_TYPE.


End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version



Wudfddi_types.h (include Wudfddi.h)

See also




Send comments about this topic to Microsoft