RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System::Variant::OleFunction

Provides an alternate syntax for OLE Automation calls to Exec().

System::Variant::OleFunction is a wrapper for calling Exec for OLE Automation object functions. The System::Variant::Variant object's value must be a COM interface. 

name specifies the name of the function to call. Note that this parameter's value may be different for localized versions of the Automation server. As a result, it is a good idea to use a string resource for this value if the application is intended for multiple locales. 

args is a TAutoArgsBase object that contains the parameter values. Typically, this is an instance of TAutoArgs. The args parameter can be omitted if the function has no parameters.  

As an alternate syntax, there is a templatized version that can be called with up to 32 arguments, where the template parameters specify the types of each argument. 

System::Variant::OleFunction returns the value returned by the COM object's function as a System::Variant::Variant.

Note: Do not use COM features in cross-platform applications. COM is only available under Windows.
 

 

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