Expand Minimize

UsbBuildOpenStaticStreamsRequest function

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(
  _Inout_  PURB Urb,
  _In_     USBD_PIPE_HANDLE PipeHandle,
  _In_     USHORT NumberOfStreams,
  _In_     USBD_STREAM_INFORMATION StreamInfoArray
);

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.

Return value

This function does not return a 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.

Requirements

Version

Requires WDK for Windows 8. Targets Windows Vista and later versions of the Windows operating system.

Header

Usbdlib.h

See also

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

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft