Click or drag to resize

USBPipeEndWrite Method

Waits for a pending asynchronous write operation to complete.

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

Parameters

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

Return Value

Type: 
The number of bytes transfered during the operation.
Remarks
Every call to BeginWrite(Byte, Int32, Int32, AsyncCallback, Object) must have a matching call to EndWrite(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