WinUsb_RegisterIsochBuffer function (winusb.h)

The WinUsb_RegisterIsochBuffer function registers a buffer to be used for isochronous transfers.

Syntax

BOOL WinUsb_RegisterIsochBuffer(
  [in]  WINUSB_INTERFACE_HANDLE     InterfaceHandle,
  [in]  UCHAR                       PipeID,
  [in]  PUCHAR                      Buffer,
  [in]  ULONG                       BufferLength,
  [out] PWINUSB_ISOCH_BUFFER_HANDLE IsochBufferHandle
);

Parameters

[in] InterfaceHandle

An opaque handle to an interface in the selected configuration. That handle must be created by a previous call to WinUsb_Initialize or WinUsb_GetAssociatedInterface.

[in] PipeID

Derived from Bit 3...0 of the bEndpointAddress field in the endpoint descriptor.

[in] Buffer

Pointer to the transfer buffer to be registered.

[in] BufferLength

Length, in bytes, of the transfer buffer pointed to by Buffer.

[out] IsochBufferHandle

Receives an opaque handle to the registered buffer. This handle is required by other WinUSB functions that perform isochronous transfers. To release the handle, call the WinUsb_UnregisterIsochBuffer function.

Return value

WinUsb_RegisterIsochBuffer 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

Prior to initiating isochronous transfers to or from a buffer, the caller must register the buffer with WinUsb_RegisterIsochBuffer. This call allows the Winusb.sys to pre-map and lock the buffer after for all subsequent transfers using the buffer.

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

WinUsb_UnregisterIsochBuffer