System.Classes.TComponent.BeginInvoke

De Appmethod Libraries
Aller à : navigation, rechercher

Object Pascal

function BeginInvoke(const AProc: TProc; const AContext: TObject = nil): IAsyncResult; overload;
function BeginInvoke(const AProc: TASyncProcedureEvent; const AContext: TObject = nil): IAsyncResult; overload;
function BeginInvoke<TResult>(const AFunc: TFunc<TResult>; const AContext: TObject = nil): IAsyncResult; overload;
function BeginInvoke(const AProc: TAsyncConstArrayProc; const Params: array of const; const AContext: TObject = nil): IAsyncResult; overload;
function BeginInvoke<TResult>(const AFunc: TAsyncConstArrayFunc<TResult>; const Params: array of const; const AContext: TObject = nil): IAsyncResult; overload;
function BeginInvoke(const AProc: TAsyncConstArrayProcedureEvent; const Params: array of const; const AContext: TObject = nil): IAsyncResult; overload;
function BeginInvoke(const AFunc: TAsyncConstArrayFunctionEvent; const Params: array of const; const AContext: TObject = nil): IAsyncResult; overload;
function BeginInvoke(const AFunc: TAsyncFunctionEvent; const AContext: TObject = nil): IAsyncResult; overload;

C++

System::Types::_di_IAsyncResult __fastcall BeginInvoke(const System::Sysutils::_di_TProc AProc, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginInvoke(const TAsyncProcedureEvent AProc, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
template<typename TResult> System::Types::_di_IAsyncResult __fastcall BeginInvoke(const System::DelphiInterface<System::Sysutils::TFunc__1<TResult> > AFunc, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginInvoke(const _di_TAsyncConstArrayProc AProc, System::TVarRec const *Params, const int Params_High, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
template<typename TResult> System::Types::_di_IAsyncResult __fastcall BeginInvoke(const System::DelphiInterface<TAsyncConstArrayFunc__1<TResult> > AFunc, System::TVarRec const *Params, const int Params_High, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginInvoke(const TAsyncConstArrayProcedureEvent AProc, System::TVarRec const *Params, const int Params_High, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginInvoke(const TAsyncConstArrayFunctionEvent AFunc, System::TVarRec const *Params, const int Params_High, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginInvoke(const TAsyncFunctionEvent AFunc, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;

Propriétés

Type Visibilité  Source Unité  Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TComponent


Description

Effectue un appel asynchrone à la méthode spécifiée par <AProc> ou <AFunc>.

Le paramètre <AContext> spécifie le contexte dans lequel la méthode s'exécute. Ce contexte correspond au thread principal. Dans le cas d'un descendant Tcontrol, elle s'exécute dans le contexte du thread sur lequel le handle de fenêtre le plus proche a été créé.

BeginInvoke renvoie les résultats de l'exécution asynchrone dans une interface IAsyncResult utilisée comme type de renvoi.

Voir aussi