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

Sets the value of a property on a COM interface.

Pascal
procedure OlePropertySet(const name: String&; var args: TAutoArgsBase);
procedure OlePropertySet(const name: String&; p1: P1);
procedure OlePropertySet(const name: String&; p1: P1; p2: P2);
procedure OlePropertySet(const name: String&; p1: P1; p2: P2; p3: P3);
procedure OlePropertySet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4);
procedure OlePropertySet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5);
procedure OlePropertySet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6);
procedure OlePropertySet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6; p7: P7);
procedure OlePropertySet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6; p7: P7; p8: P8);
procedure OlePropertySet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6; p7: P7; p8: P8; p9: P9);
procedure OlePropertySet(const name: String&; p1: P1; p2: P2; p3: P3; p4: P4; p5: P5; p6: P6; p7: P7; p8: P8; p9: P9; p10: P10);
C++
void OlePropertySet(const String& name, TAutoArgsBase& args);
template <class P1> void OlePropertySet(const String& name, P1 p1);
template <class P1, class P2> void OlePropertySet(const String& name, P1 p1, P2 p2);
template <class P1, class P2, class P3> void OlePropertySet(const String& name, P1 p1, P2 p2, P3 p3);
template <class P1, class P2, class P3, class P4> void OlePropertySet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4);
template <class P1, class P2, class P3, class P4, class P5> void OlePropertySet(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> void OlePropertySet(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> void OlePropertySet(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> void OlePropertySet(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> void OlePropertySet(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> void OlePropertySet(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::OlePropertySet is a wrapper for calling Exec. You can use System::Variant::OlePropertySet to set the value of a property on an interface that is the System::Variant::Variant object's value. 

name is the name of the property whose value is set. 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 of the property's write access method. Typically, this is an instance of TAutoArgs with one parameter (the value to set).  

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!