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

Provides alternative syntax to OLE Automation calls to Exec().

System::Variant::OleProcedure is a wrapper for calling Exec for OLE procedures (functions that do not return a value). The System::Variant::Variant object's value must be a COM interface. 

name specifies the name of the procedure 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 procedure 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.

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!