Contains methods to create, access, and destroy shared property groups.
CreatePropertyGroup – Creates a new property group or retrieve a reference to the existing group with the specified name.
get_Group – Retrieves a reference to an existing property group.
get__NewEnum – Not supported.
The ISharedPropertyGroupManager interface allows you to create new shared property groups and find out about existing groups.
To create a ISharedPropertyGroupManager interface pointer, use the ProgID, “Jaguar.SharedPropertyGroupManager.” Call the OLE routines CLSIDfromProgID and CoCreateInstance. CoCreateInstance returns an interface pointer for a given ActiveX class ID string. CLSIDfromProgID obtains the class ID string that CoCreateInstance requires.
To use the ISharedPropertyGroupManager, ISharedPropertyGroup, and ISharedProperty interfaces, you must include JagSharedProp.h. Additionally, you must include JagSharedProp_i.c in only one source file for your component DLL. JagSharedProp.h contains interface definitions for the documented interfaces. JagSharedProp_i.c declares symbols that are required by the ActiveX CoCreateInstance routine.
WARNING! You will get duplicate-symbol link errors if you include JagSharedProp_i.c in more than one source file for your component DLL.
ISharedProperty interface, ISharedPropertyGroup interface
Creates a new property group or retrieve a reference to the existing group with the specified name.
#include <jagctx.h> #include <JagSharedProp.h> HRESULT ISharedPropertyGroupManager::CreatePropertyGroup ( BSTR groupName, LONG* plIsolationMode, LONG* plReleaseMode, VARIANT_BOOL* pfExists, ISharedPropertyGroup ** ppGroup );
The name by which the property group is referred. Cannot be NULL, but a zero-length string is a valid name.
A pointer to a LONG variable that describes the isolation (locking) mode for access to the property group. On input, must be the following symbolic constant:
Isolation mode |
Value |
Meaning |
---|---|---|
LockMethod |
1 |
The property group is locked from the first access until the current method returns. Use this isolation mode to prevent other component instances from accessing a property group while you retrieve or set multiple properties in the group. |
If the property group already exists, the input value is ignored and output value is set to reflect the isolation mode of the existing property group.
A pointer to a LONG variable that describes the release mode for the property group. On input, must be the following symbolic constant:
Release mode |
Value |
Meaning |
---|---|---|
Process |
1 |
The property group is not destroyed even when all references have been released. |
If the property group already exists, the input value is ignored and output value is set to reflect the release mode of the existing property group.
On output, set to VARIANT_TRUE if the property group already existed or VARIANT_FALSE otherwise. Can be NULL if you do not care whether the group existed previously.
The address of a ISharedPropertyGroup interface pointer. On output, contains a reference to a ISharedPropertyGroup object for the property group or NULL if an error occurred.
Return value |
To indicate |
---|---|
S_OK |
Success. |
E_INVALIDARG |
One or more parameters contained invalid input values. |
CreatePropertyGroup creates a new shared property group or returns a reference to an existing group that has the specified name.
Property groups can be shared only among components that are installed in the same EAServer package. A group created by a component that is installed in one package cannot be retrieved by a component that is installed in a different package.
get_Group, ISharedPropertyGroup interface
Retrieves a reference to an existing property group.
#include <jagctx.h> #include <JagSharedProp.h> HRESULT ISharedPropertyGroupManager::get_Group ( BSTR name, ISharedPropertyGroup ** ppGroup, );
The name of the group to be retrieved.
On output, a reference to a ISharedPropertyGroup object for the property group or NULL if an error occurred.
Return value |
To indicate |
---|---|
S_OK |
Success. |
E_INVALIDARG |
Either name or ppGroup was NULL or no property group exists with the specified name. |
get_Group returns a reference to the property group with the same name. get_Group fails if no group has been created with the specified name. Call CreatePropertyGroup when you are not sure whether a group already exists.
Property groups can be shared only among components that are installed in the same EAServer package. A group created by a component that is installed in one package cannot be retrieved by a component that is installed in a different package.
CreatePropertyGroup, ISharedPropertyGroup interface
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |