EssOtlGetNextAliasCombination() returns the alias combinations for the specified member in the specified alias table. The alias is returned in the pszAlias parameter, and the member combination is returned in pszCombination.
ESS_FUNC_M EssOtlGetNextAliasCombination (hOutline, hMember, pszAliasTable, pszAlias, ppszCombination);
ESS_HOUTLINE_T | hOutline |
ESS_HMEMBER_T | hMember |
ESS_STR_T | pszAliasTable |
ESS_STR_T | pszAlias |
ESS_PSTR_T | ppszCombination |
hOutline | Outline context handle. |
hMember | Handle of member to retrieve the alias combination from. |
pszAliasTable | Alias table to retrieve the alias combination from. If this parameter is ESS_NULL, the default alias table is used. |
pszAlias | Buffer for the return of the next alias. The next alias is determined by what is specified in this parameter. If a zero-length string is passed, the first alias combination is returned. If the parameter is a valid alias combination, the next alias is returned. |
ppszCombination | Member combination of the returned alias. This buffer is allocated by the API. |
Returns 0 if successful; otherwise:
OTLAPI_BAD_ALIASTABLE
#include <essapi.h> #include <essotl.h> ESS_STS_T sts = 0; ESS_OBJDEF_T Object; ESS_HOUTLINE_T hOutline; ESS_HMEMBER_T hMemberJan; ESS_MBRNAME_T szAlias; ESS_STR_T pszCombination; ESS_APPNAME_T szAppName; ESS_DBNAME_T szDbName; ESS_OBJNAME_T szFileName; memset(&Object, '\0', sizeof(Object)); Object.hCtx = hCtx; Object.ObjType = ESS_OBJTYPE_OUTLINE; strcpy(szAppName, "Sample"); strcpy(szDbName, "Basic"); strcpy(szFileName, "Basic"); Object.AppName = szAppName; Object.DbName = szDbName; Object.FileName = szFileName; sts = EssOtlOpenOutline(hCtx, &Object, ESS_TRUE, ESS_TRUE, &hOutline); if (!sts) { sts = EssOtlFindMember(hOutline, "Jan", &hMemberJan); } if (!sts && hMemberJan) { *szAlias = '\0'; sts = EssOtlGetNextAliasCombination(hOutline, hMemberJan, ESS_NULL, szAlias, &pszCombination); /* do something with pszCombination if valid*/ while (!sts && pszCombination) { EssFree(hInst, pszCombination); sts = EssOtlGetNextAliasCombination (hOutline,hMemberJan, ESS_NULL, szAlias, &pszCombination); } } if (pszCombination) { EssFree(hInst, pszCombination); }
EssFree()
EssOtlAddAliasCombination()
EssOtlDeleteAliasCombination()