RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TInvokeableVariantType.DoFunction Method

Implements all methods that return values.

Pascal
function DoFunction(var Dest: TVarData; const V: TVarData; const Name: string; const Arguments: TVarDataArray): Boolean; virtual;
C++
virtual __fastcall Boolean DoFunction(TVarData Dest, const TVarData V, const AnsiString Name, const TVarDataArray Arguments);

Override DoFunction to provide the implementation for method calls that return values. When the application invokes a System::Variant member function (Delphi) or calls the System::Variant's Exec method (C++) a call is automatically generated to DoFunction. 

Dest is a TVarData record that receives the value that the function returns. 

V is the TVarData record from the System::Variant instance that was used to call the function. 

Name is the name of the function. 

Arguments is a dynamic array of TVarData records, where each one represents the value of an argument passed to the function.  

DoFunction returns true if it executes the method call, false if it does not implement the specified function. 

As implemented in TInvokeableVariant, DoFunction always returns false, because it does not implement any function calls. 

 

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