Sm_PolicyApi_GetGroup()
Gets the contents of the group object identified bypszGroupOid. The results of this function are returned in a structure referenced by ppStructGroup.
casso126
Gets the contents of the group object identified bypszGroupOid. The results of this function are returned in a structure referenced by
ppStructGroup
.The
pszDomainOid
parameter is required by a rule or response group. An agent group does not require a domain OID because it is not a domain-based object.Free the memory allocated for this structure by calling Sm_PolicyApi_FreeMemoryEx().
Type
Group function, global scope (agents) or domain scope (responses, rules).
Syntax
int SM_EXTERN Sm_PolicyApi_GetGroup (void*pSessionHandle,Sm_PolicyApi_Groups_tdwGroup,const char*pszGroupOid,const char*pszDomainOid,Sm_PolicyApi_Group_t**ppStructGroup);
Parameter | I/O | Description |
pSessionHandle
| I | A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session. |
dwGroup
| I | The type of group to be retrieved. |
pszGroupOid
| I | A null-terminated string containing the object identifier of the group object being retrieved. |
pszDomainOid
| I | A null-terminated string containing the object identifier of an existing domain. Required parameter for rule or response groups. |
ppStructGroup
| O | The address of a pointer to a group structure. |
Returns
- Sm_PolicyApi_Success. The get was successful.
- Sm_PolicyApi_Failure. The get was not successful.
- Sm_PolicyApi_InvalidHandle. There was no valid initialization prior to this call.
- Sm_PolicyApi_NoSession. There is no valid administrator session.
- Sm_PolicyApi_NoPrivilege. The administrator does not have the privilege to get the contents of a group.
- Sm_PolicyApi_InvalidOid:
- The group OID was not found.
- The domain OID was not found (for a domain-based group).
- Sm_PolicyApi_BadGroup. ThedwGroupparameter is not the rule, response, or agent type.