UsbBuildOpenStaticStreamsRequest - NtDoc

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

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

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-usbdlib-usbbuildopenstaticstreamsrequest)

UsbBuildOpenStaticStreamsRequest function

Description

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

Parameters

Urb [in, out]

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.

PipeHandle [in]

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).

NumberOfStreams [in]

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.

StreamInfoArray [in]

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.

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.

See also

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

_URB_OPEN_STATIC_STREAMS