WinUsb_AbortPipe function (winusb.h)

The WinUsb_AbortPipe function aborts all of the pending transfers for a pipe. This is a synchronous operation.

Syntax

BOOL WinUsb_AbortPipe(
  [in] WINUSB_INTERFACE_HANDLE InterfaceHandle,
  [in] UCHAR                   PipeID
);

Parameters

[in] InterfaceHandle

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

To abort transfers on the pipe associated with the 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] PipeID

The identifier (ID) of the control pipe. The PipeID parameter is an 8-bit value that consists of a 7-bit address and a direction bit. This parameter corresponds to the bEndpointAddress field in the endpoint descriptor.

Return value

WinUsb_AbortPipe returns TRUE if the operation succeeds. Otherwise, this routine 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.

Requirements

Requirement Value
Target Platform Universal
Header winusb.h (include Winusb.h)
Library Winusb.lib
DLL Winusb.dll

See also

WinUSB

WinUSB Functions

WinUsb_Free

WinUsb_Initialize