Platform SDK: Transaction Server |
ISharedPropertyGroup.CreateProperty Method
[This product will work only on Windows NT 4.0 versions and earlier. For Windows 2000 and later, see COM+ (Component Services).]
Creates and returns a reference to a new SharedProperty with a specified name. If a shared property by that name already exists, CreateProperty returns a reference to the existing property.
Provided By
ISharedPropertyGroup Interface
ISharedProperty CreateProperty ( String name, boolean[] exists; );
Parameters
name
[in] The name of the property to create. You can use this name later to obtain a reference to this property by using the getProperty method.
exists
[out] An array of one Boolean value that's set to true
on return from this method if the shared property specified in the name parameter existed prior to this call, and false
if the property was created by this call.
Return Value
A reference to a shared property object with the name specified in the name parameter, or null
if an error is encountered.
Remarks
When you create a shared property, its value is set to the default, which is a Variant with an integer value of 0.
If you create a shared property with the CreateProperty method, you can access that property only by using the getProperty method. You can't assign a numeric index to the same property and then access it by using the getPropertyByPosition method.
The same shared property group can contain some shared property objects that are identified by name and others that are identified by position.
See Also
Sharing State, ISharedPropertyGroup::CreatePropertyByPosition Method, ISharedPropertyGroup::get_PropertyByPosition Method, ISharedPropertyGroup::get_Property Method