Represents a group of properties that are shared by all ActiveX components in a EAServer package. Contains methods to create, access, and destroy shared properties.
CreateProperty – Creates a new shared property by name.
CreatePropertyByPosition – Creates a new shared property by position.
get_Property – Retrieves a reference to a named property.
get_PropertyByPosition – Retrieves a reference to an indexed property.
Call the ISharedPropertyGroupManager methods to create a new ISharedPropertyGroup object or to obtain a reference to an existing property group.
Property groups can be shared only among components that are installed in the same EAServer package.
ISharedProperty interface, ISharedPropertyGroupManager interface
Creates a new shared property by name.
#include <jagctx.h> #include <JagSharedProp.h> HRESULT ISharedPropertyGroup::CreateProperty ( BSTR propertyName, VARIANT_BOOL* pfAlreadyExisted; ISharedProperty ** ppProperty, );
A string containing the name by which the property will be referred.
The address of a VARIANT_BOOL variable. On output, set to VARIANT_TRUE if the property already existed or VARIANT_FALSE otherwise. pfAlreadyExisted can be NULL if you do not care whether the property existed previously.
On output, a reference to an ISharedProperty object for the property or NULL if an error occurred.
Return value |
To indicate |
---|---|
S_OK |
Success. |
E_INVALIDARG |
Either name or ppProperty was NULL. |
CreateProperty creates named properties that can be retrieved with the get_Property method. Properties can be referenced either by name or by position but not by both.
Newly created properties are set to a default value, which is a VARIANT of type VT_I4 (4-byte integer), with a value of 0.
Call CreatePropertyByPosition to create indexed properties (retrieved with CreatePropertyByPosition).
CreateProperty, get_Property, CreatePropertyByPosition, ISharedProperty interface
Creates a new shared property by position.
#include <jagctx.h> #include <JagSharedProp.h> HRESULT ISharedPropertyGroup::CreatePropertyByPosition ( INT position, VARIANT_BOOL* pfAlreadyExisted, ISharedProperty ** ppProperty );
The index by which the property will be referred.
The address of a VARIANT_BOOL variable. On output, set to VARIANT_TRUE if the property already existed or VARIANT_FALSE otherwise. pfAlreadyExisted can be NULL if you do not care whether the property existed previously.
On output, a reference to a ISharedProperty object for the property or NULL if an error occurred.
Return value |
To indicate |
---|---|
S_OK |
Success. |
E_INVALIDARG |
Either name or ppProperty was NULL. |
CreatePropertyByPosition creates indexed properties that can be retrieved with the get_PropertyByPosition method. Properties can be referenced either by name or by position but not by both means.
Newly created properties are set to a default value, which is a VARIANT of type VT_I4 (4-byte integer), with a value of 0.
Call CreateProperty to create named properties (retrieved with get_Property).
CreateProperty, get_Property, get_PropertyByPosition
Retrieves a reference to a named property.
#include <jagctx.h> #include <JagSharedProp.h> HRESULT ISharedPropertyGroup::get_Property ( BSTR propertyName, ISharedProperty ** ppProp );
The name of the property to be retrieved.
On output, a reference to a ISharedProperty object for the property or NULL if an error occurred.
Return value |
To indicate |
---|---|
S_OK |
Success. |
E_INVALIDARG |
Either name or ppProp was NULL or no property with the specified name exists in this property group. |
Named properties are created with the CreateProperty method.
get_Property fails if the requested property has not been created. Call CreateProperty when you are not sure whether a property exists yet. CreateProperty retrieves existing properties or creates them if they do not already exist.
CreateProperty, CreatePropertyByPosition, get_PropertyByPosition
Retrieves a reference to an indexed property.
#include <jagctx.h> #include <JagSharedProp.h> HRESULT ISharedPropertyGroup::get_PropertyByPosition ( INT position, ISharedProperty ** ppProp );
The index of the property to be retrieved.
On output, a reference to a ISharedProperty object for the property or NULL if an error occurred.
Return value |
To indicate |
---|---|
S_OK |
Success. |
E_INVALIDARG |
ppProp was NULL or no property with the specified index exists in this property group. |
Indexed properties are created with the CreatePropertyByPosition method.
get_PropertyByPosition fails if the requested property has not been created. Call CreatePropertyByPosition when you are not sure whether a property exists yet. CreatePropertyByPosition retrieves existing properties or creates them if they do not already exist.
CreateProperty, CreatePropertyByPosition, get_Property
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |