System.Classes.TComponent.BeginInvoke

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

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, const System::TVarRec *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, const System::TVarRec *Params, const int Params_High, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginInvoke(const TAsyncConstArrayProcedureEvent AProc, const System::TVarRec *Params, const int Params_High, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginInvoke(const TAsyncConstArrayFunctionEvent AFunc, const System::TVarRec *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 */;

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
function public
System.Classes.pas
System.Classes.hpp
System.Classes TComponent


Beschreibung

Führt einen asynchronen Aufruf der in AProc oder AFunc angegebenen Methode durch.

Der Parameter AContext gibt den Kontext an, in dem die Methode ausgeführt wird. Dieser Kontext entspricht dem Haupt-Thread. Bei einem Nachkommen von TControl wird der Kontext des Threads ausgeführt, für den das nächstgelegene Fenster-Handle erstellt wurde.

BeginInvoke gibt die Ergebnisse der asynchronen Ausführung in einem IAsyncResult-Interface zurück, das als Rückgabetyp verwendet wird.

Siehe auch