WinUsb_QueryPipeEx function (winusb.h)

The WinUsb_QueryPipeEx function retrieves extended information about the specified endpoint and the associated pipe for an interface.

Syntax

BOOL WinUsb_QueryPipeEx(
  [in]  WINUSB_INTERFACE_HANDLE     InterfaceHandle,
  [in]  UCHAR                       AlternateSettingNumber,
  [in]  UCHAR                       PipeIndex,
  [out] PWINUSB_PIPE_INFORMATION_EX PipeInformationEx
);

Parameters

[in] InterfaceHandle

An opaque handle to an interface that contains the endpoint with which the pipe is associated.

To query the pipe associated with an endpoint in the first interface, use the handle returned by WinUsb_Initialize. For all other interfaces, use the handle to the target interface, retrieved by WinUsb_GetAssociatedInterface.

[in] AlternateSettingNumber

A value that specifies the alternate interface to return the information for.

[in] PipeIndex

A value that specifies the pipe to return information about. This value is not the same as the bEndpointAddress field in the endpoint descriptor. A PipeIndex value of 0 signifies the first endpoint that is associated with the interface, a value of 1 signifies the second endpoint, and so on. PipeIndex must be less than the value in the bNumEndpoints field of the interface descriptor.

[out] PipeInformationEx

A pointer, on output, to a caller-allocated WINUSB_PIPE_INFORMATION_EX structure that contains pipe information.

Return value

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

GetLastError can return the following error code.

Return code Description
ERROR_INVALID_HANDLE
The caller passed NULL in the InterfaceHandle parameter.
ERROR_INVALID_PARAMETER
The caller passed NULL in the PipeInformation parameter; interface descriptor could not be found for the handle specified in InterfaceHandle.
ERROR_NO_MORE_ITEMS
The value passed in the PipeIndex parameter is greater than the bNumEndpoints value of the interface descriptor; endpoint descriptor could not be found for the specified interface.

Remarks

The WinUsb_QueryPipeEx function does not retrieve information about the control pipe.

Requirements

Requirement Value
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_PIPE_INFORMATION

WinUSB

WinUSB Functions

WinUsb_Initialize