WDF_USB_CONTINUOUS_READER_CONFIG - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfusb.h

typedef struct _WDF_USB_CONTINUOUS_READER_CONFIG {
  ULONG                                 Size;
  size_t                                TransferLength;
  size_t                                HeaderLength;
  size_t                                TrailerLength;
  UCHAR                                 NumPendingReads;
  PWDF_OBJECT_ATTRIBUTES                BufferAttributes;
  PFN_WDF_USB_READER_COMPLETION_ROUTINE EvtUsbTargetPipeReadComplete;
  WDFCONTEXT                            EvtUsbTargetPipeReadCompleteContext;
  PFN_WDF_USB_READERS_FAILED            EvtUsbTargetPipeReadersFailed;
} WDF_USB_CONTINUOUS_READER_CONFIG, *PWDF_USB_CONTINUOUS_READER_CONFIG;

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-wdfusb-_wdf_usb_continuous_reader_config)

_WDF_USB_CONTINUOUS_READER_CONFIG structure

Description

[Applies to KMDF and UMDF]

The WDF_USB_CONTINUOUS_READER_CONFIG structure contains information that the framework uses to configure a continuous reader for a USB pipe.

Members

Size

The size, in bytes, of this structure.

TransferLength

The maximum length, in bytes, of data that can be received from the device.

HeaderLength

An offset, in bytes, into the buffer that receives data from the device. The framework will store data from the device in a read buffer, beginning at the offset value. In other words, this space precedes the TransferLength-sized space in which the framework stores data from the device.

TrailerLength

The length, in bytes, of a trailing buffer space. This space follows the TransferLength-sized space in which the framework stores data from the device.

NumPendingReads

The number of read requests that the framework will queue to receive data from the I/O target. If this value is zero, the framework uses a default number of read requests. If the specified value is greater than the permitted maximum, the framework uses the permitted maximum. For more information about the NumPendingReads member, see the following Remarks section.

BufferAttributes

A WDF_OBJECT_ATTRIBUTES structure that specifies object attributes for the framework memory object that the framework creates for each read request. This member can be NULL. You cannot set the ParentObject member of the WDF_OBJECT_ATTRIBUTES structure.

EvtUsbTargetPipeReadComplete

A pointer to the driver's EvtUsbTargetPipeReadComplete callback function.

EvtUsbTargetPipeReadCompleteContext

An untyped pointer to driver-defined context information that the framework passes to the driver's EvtUsbTargetPipeReadComplete callback function.

EvtUsbTargetPipeReadersFailed

A pointer to the driver's EvtUsbTargetPipeReadersFailed callback function. This pointer is optional and can be NULL. For more information about this parameter, see the Remarks section of WdfUsbTargetPipeConfigContinuousReader.

Remarks

The WDF_USB_CONTINUOUS_READER_CONFIG structure is used as input to the WdfUsbTargetPipeConfigContinuousReader method.

To initialize a WDF_USB_CONTINUOUS_READER_CONFIG structure, the driver must call WDF_USB_CONTINUOUS_READER_CONFIG_INIT.

Use the following guidelines when choosing a value for the NumPendingReads member:

A NumPendingReads value that is too large can slow down a system's performance. You should use the lowest value that meets your performance requirements. Typically, values that are higher than 3 or 4 do not improve data throughput. But higher values might reduce latency, or the chance of missing data, on a high-frequency pipe.

See also

EvtUsbTargetPipeReadComplete

EvtUsbTargetPipeReadersFailed

WDF_OBJECT_ATTRIBUTES

WDF_USB_CONTINUOUS_READER_CONFIG_INIT

WdfUsbTargetPipeConfigContinuousReader