RAD Studio VCL Reference
IDispatch.Invoke Method

Invoke performs a call to a late-binded property or method.

function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer; Flags: Word; var Params; VarResult: Pointer; ExcepInfo: Pointer; ArgErr: Pointer): HResult; stdcall;
__fastcall __stdcall HRESULT Invoke(int DispID, const TGUID IID, int LocaleID, Word Flags,  Params, void * VarResult, void * ExcepInfo, void * ArgErr);

Invoke actually calls a method or a property exposed by the COM object through IDispatch. Invoke requires a previously obtained dispatch identifier. The identifier uniquely identifies a method, a property, and a list of parameters to be passed to the called method and exception information. The dispatch identifier of a method or property (also known as dispid) can be obtained by a calling the GetIDsOfNames method. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!