System.Variant.OlePropertySet

From RAD Studio API Documentation
Jump to: navigation, search

C++

void    OlePropertySet(const String& name, TAutoArgsBase* args);
void Variant::OlePropertySet(const String& name, P1 p1)
void Variant::OlePropertySet(const String& name, P1 p1, P2 p2)
void Variant::OlePropertySet(const String& name, P1 p1, P2 p2, P3 p3)
void Variant::OlePropertySet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4)
void Variant::OlePropertySet(const String& name, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
void Variant::OlePropertySet(const String& name,
  P1 p1, P2 p2, P3 p3, P4 p4, P5 p5,
  P6 p6)
void Variant::OlePropertySet(const String& name,
  P1 p1, P2 p2, P3 p3, P4 p4, P5 p5,
  P6 p6, P7 p7)
void Variant::OlePropertySet(const String& name,
  P1 p1, P2 p2, P3 p3, P4 p4, P5 p5,
  P6 p6, P7 p7, P8 p8)
void Variant::OlePropertySet(const String& name,
  P1 p1, P2 p2, P3 p3, P4 p4, P5 p5,
  P6 p6, P7 p7, P8 p8, P9 p9)
void Variant::OlePropertySet(const String& name,
  P1 p1, P2 p2, P3 p3, P4 p4, P5 p5,
  P6 p6, P7 p7, P8 p8, P9 p9, P10 p10)

Properties

Type Visibility Source Unit Parent
function public sysvari.h System Variant

Description

Sets the value of a property on a COM interface.

OlePropertySet is a wrapper used to call Exec. You can use OlePropertySet to set the value of a property on an interface that is the 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, you should 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.

See Also