System.Classes.TComponent.BeginInvoke

From RAD Studio API Documentation
Jump to: navigation, search

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 */;

Properties

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

Description

Performs an asynchronous call to the method specified by either AProc or AFunc.

The AContext parameter specifies the context where the method executes in. This context corresponds to the main thread. In case of a Tcontrol descendant, it executes in the context of the thread on which the closest window handle was created.

BeginInvoke returns the results of the asynchronous execution in an interface IAsyncResult used as a return type.

See Also