RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Variant::OlePropertyGet Method (String&, P1)

Returns the value of a property on a COM interface.

Pascal
function OlePropertyGet(const name: String&; var args: TAutoArgsBase = 0): Variant;
function OlePropertyGet(const name: String&; p1: P1): Variant;
function OlePropertyGet(const name: String&; p1: P1; p2: P2): Variant;
function OlePropertyGet(const name: String&; p1: P1; p2: P2; p3: P3): Variant;
function OlePropertyGet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4): Variant;
function OlePropertyGet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5): Variant;
function OlePropertyGet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6): Variant;
function OlePropertyGet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6; p7: P7): Variant;
function OlePropertyGet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6; p7: P7; p8: P8): Variant;
function OlePropertyGet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6; p7: P7; p8: P8; p9: P9): Variant;
function OlePropertyGet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6; p7: P7; p8: P8; p9: P9; p10: P10): Variant;
C++
Variant OlePropertyGet(const String& name, TAutoArgsBase* args = 0);
template <class P1> Variant OlePropertyGet(const String& name, P1 p1);
template <class P1, class P2> Variant OlePropertyGet(const String& name, P1 p1, P2 p2);
template <class P1, class P2, class P3> Variant OlePropertyGet(const String& name, P1 p1, P2 p2, P3 p3);
template <class P1, class P2, class P3, class P4> Variant OlePropertyGet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4);
template <class P1, class P2, class P3, class P4, class P5> Variant OlePropertyGet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5);
template <class P1, class P2, class P3, class P4, class P5, class P6> Variant OlePropertyGet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6);
template <class P1, class P2, class P3, class P4, class P5, class P6, class P7> Variant OlePropertyGet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7);
template <class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8> Variant OlePropertyGet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8);
template <class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9> Variant OlePropertyGet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9);
template <class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9, class P10> Variant OlePropertyGet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10);

System::Variant::OlePropertyGet is a wrapper for calling Exec(). System::Variant::OlePropertyGet returns a property value on the interface that is the System::Variant::Variant object's value. 

name is the name of the property whose value is returned. 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 for the property's read access method. Typically, this is an instance of TAutoArgs. The args parameter can be omitted if the access method has no parameters.  

As an alternate syntax, there is a templatized version that can be called with up to 10 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) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!