UsbBuildOpenStaticStreamsRequest function (usbdlib.h)

The UsbBuildOpenStaticStreamsRequest inline function formats an URB structure for an open-streams request. The request opens streams associated with the specified bulk endpoint.

Syntax

void UsbBuildOpenStaticStreamsRequest(
  [in, out] PURB                     Urb,
  [in]      USBD_PIPE_HANDLE         PipeHandle,
  [in]      USHORT                   NumberOfStreams,
  [in]      PUSBD_STREAM_INFORMATION StreamInfoArray
);

Parameters

[in, out] Urb

Pointer to the URB structure to be formatted for the open-stream request (URB_FUNCTION_OPEN_STATIC_STREAMS). The caller must allocate nonpaged pool for this URB.

[in] PipeHandle

An opaque handle for the pipe associated with the endpoint that contains the streams to open.

The client driver obtains PipeHandle from a previous select-configuration request (URB_FUNCTION_SELECT_CONFIGURATION) or a select-interface request (URB_FUNCTION_SELECT_INTERFACE).

[in] NumberOfStreams

The number of streams to open. The NumberOfStreams value indicates the number of elements in the array pointed to by Streams. This value must be greater than zero and less than or equal to the maximum number of streams supported by the host controller hardware. To get the maximum number of supported streams, call USBD_QueryUsbCapability.

The number streams must also be less than or equal to the maximum number of streams supported by the USB device. To get that number, inspect the endpoint companion descriptor.

In the NumberOfStreams value, specify lesser of two values supported by the host controller and the USB device.

[in] StreamInfoArray

Pointer to a caller-allocated, initialized array of USBD_STREAM_INFORMATION structures. The length of the array depends on the number of streams to open and must be the same as the NumberOfStreams value.

Return value

None

Remarks

For a code example that shows the URB format required for an open-streams request, see How to Open and Close Static Streams in a USB Bulk Endpoint.

Requirements

Requirement Value
Minimum supported client Requires WDK for Windows 8. Targets Windows Vista and later versions of the Windows operating system.
Target Platform Desktop
Header usbdlib.h

See also

How to Open and Close Static Streams in a USB Bulk Endpoint

_URB_OPEN_STATIC_STREAMS