Sets a COM object's property value.
1 if the object's property was set successfully, 0 if there was an error.
The SET service sets a property value. The Object parameter identifies the instantiated object whose property you wish to set. The Name parameter is the name of the property to set and is not case sensitive. The value parameter is the new value to which the property will be set.
For indexed parameters, simply pass the requisite index values immediately following the Name parameter but before the value parameter. Note that this is different from OpenInsight's Set_Property method, in which indexes are passed within square brackets following the property name. For example, you might set the first item of a property using OpenInsight's Set_Property like so:
The same code using SRP_Com looks like this:
Most properties do not use indexes, in which case the new property value immediately follows the property name, like so:
The SET service also differs from Set_Property in its return value. Set_Property returns the property's previous value. The SRP_Com SET service returns a success/failure. If a zero is returned, use the ERROR service to determine why the property could not be set.