WDF_DEVICE_IO_TYPE (UMDF) enumeration

[Applies to UMDF 1.x only]

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

Syntax


typedef enum _WDF_DEVICE_IO_TYPE { 
  WdfDeviceIoUndefined         = 0x00,
  WdfDeviceIoNeither           = 0x01,
  WdfDeviceIoBuffered          = 0x02,
  WdfDeviceIoDirect            = 0x03,
  WdfDeviceIoBufferedOrDirect  = 0x04,
  WdfDeviceIoMaximum           = 0x5
} WDF_DEVICE_IO_TYPE, *PWDF_DEVICE_IO_TYPE;

Constants

WdfDeviceIoUndefined

Reserved for system use.

WdfDeviceIoNeither

Reserved for system use.

WdfDeviceIoBuffered

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

WdfDeviceIoDirect

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

WdfDeviceIoBufferedOrDirect

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

WdfDeviceIoMaximum

Reserved for system use.

Remarks

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.

Requirements

End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version

1.9

Header

Wudfddi_types.h (include Wudfddi.h)

See also

IWDFDeviceInitialize2::SetIoTypePreference
IWDFIoRequest2::GetEffectiveIoType
WDF_DEVICE_IO_BUFFER_RETRIEVAL

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft