EssGGetMemberInfo() returns member relationship information.
ESSG_FUNC_M EssGGetMemberInfo (hGrid, pszMbrName, sAction, bAliases, pulMembers, ppszMembers);
| ESSG_HGRID_T | hGrid ; |
| ESSG_STR_T | pszMbrName; |
| ESSG_SHORT_T | sAction; |
| ESSG_BOOL_T | bAliases ; |
| ESSG_PULONG_T | pulMembers; |
| ESSG_PSTR_T | *ppszMembers; |
| hGrid | Handle passed back from EssGNewGrid. |
| pszMbrName | Name of the member for which relationship information will be obtained. |
| sAction | Number indicating
what type of relationship information will be returned. The following values
are valid for this parameter and are mutually exclusive:
|
| bAliases | Indicates whether alias names will be returned. |
| pulMembers | Count of members being returned. |
| ppszMembers | Pointer to a one dimensional array of size pulMembers of members returned from the server. The API allocates this memory and should be freed by the caller. |
If successful, returns ESSG_STS_NOERR.
None.
ESSG_VOID_T ESSG_GetMemberInfo(ESSG_HGRID_T hGrid)
{
ESSG_FUNC_M sts = ESS_STS_NOERR;
ESSG_STR_T pszMbrName;
ESSG_SHORT_T sAction;
ESSG_BOOL_T bAliases;
ESSG_ULONG_T ulMembers, ind;
ESSG_PSTR_T pszMembers;
char tmp[5] = "Year";
pszMbrName = tmp;
sAction = ESSG_NEXTLEVEL;
bAliases = ESSG_FALSE;
/* connect the grid to a database on the server */
sts = EssGConnect(hGrid, "Rainbow", "Admin",
"Password", "Demo", "Basic",
ESSG_CONNECT_NODIALOG);
/* get member information */
if(sts == 0)
sts = EssGGetMemberInfo(hGrid,pszMbrName, sAction, bAliases,
&ulMembers, &pszMembers);
if (sts == 0)
{
printf("\nNext Level of %s:\n", pszMbrName);
for (ind = 0; ind < ulMembers; ind++)
printf("\t%s\n", *(pszMembers + ind));
EssGFreeMemberInfo(hGrid, ulMembers, pszMembers);
}
if(!sts)
sts = EssGDisconnect(hGrid, 0);
}