Retrieves the return value of the asynchronous operation represented by the IAsyncResult object passed.
[Visual Basic]
Public Overridable Function EndInvoke( _
ByVal asyncResult As IAsyncResult _
) As Object Implements ISynchronizeInvoke.EndInvoke
[C#]
public virtual object EndInvoke(
IAsyncResult asyncResult
);
[C++]
public: virtual Object* EndInvoke(
IAsyncResult* asyncResult
);
[JScript]
public function EndInvoke(
asyncResult : IAsyncResult
) : Object;
Parameters
- asyncResult
- The IAsyncResult object that represents a specific invoke asynchronous operation, returned when calling BeginInvoke.
Return Value
The Object generated by the asynchronous operation.
Implements
ISynchronizeInvoke.EndInvoke
Exceptions
| Exception Type | Condition |
| ArgumentNullException | The asyncResult parameter value is a null reference (Nothing in Visual Basic). |
| ArgumentException | The asyncResult object was not created by a preceding call of the BeginInvoke method from the same control. |
Remarks
If the asynchronous operation has not been completed, this function will block until the result is available.
Note There are four methods on a control that are safe to call from any thread: Invoke, BeginInvoke, EndInvoke, and CreateGraphics. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
Control Class | Control Members | System.Windows.Forms Namespace | BeginInvoke | InvokeRequired | Invoke