From RAD Studio API Documentation
Jump to: navigation, search


procedure DispInvoke(Dest: PVarData; [Ref] const Source: TVarData;  CallDesc: PCallDesc; Params: Pointer); virtual;


virtual void __fastcall DispInvoke(PVarData Dest, const TVarData &Source, System::PCallDesc CallDesc, void * Params);


Type Visibility Source Unit Parent
System.Variants TCustomVariantType


Invokes a method call when the Variant supports such operations.

When the application tries to call a method, set a property, or read a property using a Variant of the custom Variant type, the system automatically generates a call to DispInvoke. TCustomVariantType responds by generating a system error indicating an invalid dispatch attempt.

To create a custom Variant type that allows applications to call methods or use properties, use TInvokeableVariantType as a base class instead of TCustomVariantType. TInvokeableVariantType introduces methods for executing method calls and implementing properties, and overrides the DispInvoke method so that it dispatches method calls to the appropriate methods.

Dest is a TVarData record that receives the return value of any function calls.

Source is the TVarData record that holds the data from the custom Variant whose property or method was invoked.

CallDesc identifies the method that was called, including the type and number of its arguments.

Params points to an array of parameter values that were passed in the method call.

See Also