USBDeviceEndControlTransfer Method |
Waits for a pending asynchronous control transfer to complete.
Namespace:
MadWizard.WinUSBNet
Assembly:
WinUSBNet (in WinUSBNet.dll) Version: 2.0.0.0 (2.0.0.0)
Syntaxpublic int EndControlTransfer(
IAsyncResult asyncResult
)
Public Function EndControlTransfer (
asyncResult As IAsyncResult
) As Integer
public:
int EndControlTransfer(
IAsyncResult^ asyncResult
)
Parameters
- asyncResult
- Type: SystemIAsyncResult
The IAsyncResult object representing the asynchronous operation,
as returned by one of the ControlIn, ControlOut or ControlTransfer methods.
Return Value
Type:
Int32The number of bytes transfered during the operation.
RemarksEvery asynchronous control transfer must have a matching call to EndControlTransfer(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 EndControlTransfer will wait for the
operation to finish before returning.
See Also