Click or drag to resize

USBPipeEndRead Method

Waits for a pending asynchronous read operation to complete.

Namespace:  MadWizard.WinUSBNet
Assembly:  WinUSBNet (in WinUSBNet.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
public int EndRead(
	IAsyncResult asyncResult
)

Parameters

asyncResult
Type: SystemIAsyncResult
The IAsyncResult object representing the asynchronous operation, as returned by BeginRead(Byte, Int32, Int32, AsyncCallback, Object).

Return Value

Type: Int32
The number of bytes transfered during the operation.
Remarks
Every call to BeginRead(Byte, Int32, Int32, AsyncCallback, Object) must have a matching call to EndRead(IAsyncResult) to dispose of any resources used and to retrieve the result of the operation. When the operation was successful the method returns the number of bytes that were transfered. If an error occurred during the operation this method will throw the exceptions that would otherwise have occurred during the operation. If the operation is not yet finished EndWrite will wait for the operation to finish before returning.
See Also