Control.EndInvoke(IAsyncResult) Méthode
Définition
Récupère la valeur de retour de l'opération asynchrone représentée par le IAsyncResult passé.Retrieves the return value of the asynchronous operation represented by the IAsyncResult passed.
public:
virtual System::Object ^ EndInvoke(IAsyncResult ^ asyncResult);
public object EndInvoke (IAsyncResult asyncResult);
abstract member EndInvoke : IAsyncResult -> obj
override this.EndInvoke : IAsyncResult -> obj
Public Function EndInvoke (asyncResult As IAsyncResult) As Object
Paramètres
- asyncResult
- IAsyncResult
IAsyncResult qui représente une opération d'appel asynchrone spécifique, retourné lors de l'appel à BeginInvoke(Delegate).The IAsyncResult that represents a specific invoke asynchronous operation, returned when calling BeginInvoke(Delegate).
Retours
Implémente
Exceptions
La valeur du paramètre asyncResult
est null
.The asyncResult
parameter value is null
.
L'objet asyncResult
n'a pas été créé par un appel précédent de la méthode BeginInvoke(Delegate) à partir du même contrôle.The asyncResult
object was not created by a preceding call of the BeginInvoke(Delegate) method from the same control.
Remarques
Si l’opération asynchrone n’est pas terminée, cette fonction se bloque jusqu’à ce que le résultat soit disponible.If the asynchronous operation has not been completed, this function will block until the result is available.
Notes
En plus de la propriété InvokeRequired, il existe quatre méthodes sur un contrôle thread-safe : Invoke, BeginInvoke, EndInvoke et CreateGraphics Si le handle du contrôle a déjà été créé.In addition to the InvokeRequired property, there are four methods on a control that are thread safe: Invoke, BeginInvoke, EndInvoke, and CreateGraphics if the handle for the control has already been created. L’appel de CreateGraphics avant la création du handle du contrôle sur un thread d’arrière-plan peut entraîner des appels inter-threads non conformes.Calling CreateGraphics before the control's handle has been created on a background thread can cause illegal cross thread calls. Pour tous les autres appels de méthode, vous devez utiliser l’une des méthodes Invoke pour marshaler l’appel au thread du contrôle.For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread.