Sm_PolicyApi_GetGroupByName()

Gets the contents of the group object identified by pszGroupName. The results of this function are returned in a structure referenced by ppStructGroup.
sm1252sp1
Gets the contents of the group object identified by
pszGroupName
. 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_GetGroupByName (
void*pSessionHandle,
Sm_PolicyApi_Groups_tdwGroup,
const char*pszGroupName,
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.
pszDomainName
I
A null-terminated string containing the name 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 domain OID was not found (for a domain-based group).
  • SmPolicyApi_Notfound. The group name was not found.
  • Sm_PolicyApi_BadGroup. The
    dwGroup
    parameter is not the rule, response, or agent type.