WinUsb_ReadIsochPipeAsap function (winusb.h)

The WinUsb_ReadIsochPipeAsap function submits a request that reads data from an isochronous IN endpoint.

Syntax

BOOL WinUsb_ReadIsochPipeAsap(
  [in]           WINUSB_ISOCH_BUFFER_HANDLE  BufferHandle,
  [in]           ULONG                       Offset,
  [in]           ULONG                       Length,
  [in]           BOOL                        ContinueStream,
  [in]           ULONG                       NumberOfPackets,
                 PUSBD_ISO_PACKET_DESCRIPTOR IsoPacketDescriptors,
  [in, optional] LPOVERLAPPED                Overlapped
);

Parameters

[in] BufferHandle

An opaque handle to the transfer buffer that was registered by a previous call to WinUsb_RegisterIsochBuffer.

[in] Offset

Offset into the buffer relative to the start the transfer.

[in] Length

Length in bytes of the transfer buffer.

[in] ContinueStream

Indicates that the transfer should only be submitted if it can be scheduled in the first frame after the last pending transfer.

[in] NumberOfPackets

Total number of isochronous packets required to hold the transfer buffer. Also indicates the number of elements in the array pointed to by IsoPacketDescriptors.

IsoPacketDescriptors

An array of USBD_ISO_PACKET_DESCRIPTOR that receives the details of each isochronous packet in the transfer.

[in, optional] Overlapped

Pointer to an OVERLAPPED structure used for asynchronous operations.

Return value

WinUsb_ReadIsochPipeAsap returns TRUE if the operation succeeds. Otherwise this function returns FALSE, and the caller can retrieve the logged error by calling GetLastError.

If the caller sets ContinueStream to TRUE, The transfer fails if Winusb.sys is unable to schedule the transfer to continue the stream without dropping one or more frames.

Remarks

WinUsb_ReadIsochPipeAsap allows the USB driver stack to choose the starting frame number for the transfer. If one or more transfers are already pending on the endpoint, the transfer will be scheduled for the frame number immediately following the last frame number of the last currently pending transfer.

WinUsb_ReadIsochPipeAsap packetizes the transfer buffer so that in each interval, the host can receive the maximum bytes allowed per interval. The maximum bytes is as specified by the endpoint descriptor for full and high-speed endpoints, and endpoint companion descriptor for SuperSpeed endpoints. If the caller submits multiple read requests to stream data from the device, the transfer size should be a multiple of the maximum bytes per interval (as returned by WinUsb_QueryPipeEx) * 8 / interval.

Because of the transfer packaging used in the underlying kernel-mode interface, the lowest latency notification to an application or driver is 1ms intervals.

Requirements

Requirement Value
Minimum supported client Windows 8.1
Minimum supported server Windows Server 2012 R2
Target Platform Universal
Header winusb.h (include Winusb.h)
Library Winusb.lib
DLL Winusb.dll

See also

Send USB isochronous transfers from a WinUSB desktop app

WinUSB Functions