WinUsb_FlushPipe function (winusb.h)
The WinUsb_FlushPipe function discards any data that is cached in a pipe. This is a synchronous operation.
BOOL WinUsb_FlushPipe( [in] WINUSB_INTERFACE_HANDLE InterfaceHandle, [in] UCHAR PipeID );
An opaque handle to the interface with which the specified pipe's endpoint is associated. To clear data in a pipe that is associated with the endpoint on the first (default) interface, use the handle returned by WinUsb_Initialize. For all other interfaces, use the handle to the target interface, retrieved by WinUsb_GetAssociatedInterface.
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.
WinUsb_FlushPipe 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.
||The caller passed NULL in the InterfaceHandle parameter.|
|Header||winusb.h (include Winusb.h)|