Skip to content

IVarInvokeable

Interface needed for custom variants that need to implement dynamic properties and methods.

Declaration

Source position: variants.pp line 221

type

  IVarInvokeable = interface
  ['{1CB65C52-BBCB-41A6-9E58-7FB916BEEB2D}']
    function DoFunction : Boolean;
    function DoProcedure : Boolean;
    function GetProperty : Boolean;
    function SetProperty : Boolean;
  end;

Description

IVarInvokeable must be implemented by the TCustomVariantType descendent if the custom variant needs to implement dynamic properties and methods.

IVarInvokeable has four functions that must be implemented. Any of these functions can be called whenever a custom variant's method is invoked or a property of the variant is read or written using DispInvoke.

The TCustomVariantType descendent TInvokeableVariantType implements the needed DispInvoke to call the IVarInvokeable interface, so you can descend from that type instead when creating a new custom variant type and override the needed functions.

Methods

Member Visibility Description
DoFunction default Called for methods that return a result (functions).
DoProcedure default Called for methods that do not return a result (procedures).
GetProperty default Called when a property must be read.
SetProperty default Called when a property must be set.

See also

Name Description
TInvokeableVariantType TCustomVariantType descendent that implements DispInvoke.
TCustomVariantType Base class for a custom variant type.