# EssOtlGetMemberAlias

Description

EssOtlGetMemberAlias() gets the default member alias for the specified member in the specified alias table.

Syntax

    ESS_FUNC_M EssOtlGetMemberAlias (hOutline, hMember, pszAliasTable, ppszAlias);

ESS_HOUTLINE_T | hOutline
ESS_HMEMBER_T | hMember
ESS_STR_T | pszAliasTable
ESS_PSTR_T | ppszAlias

Parameters

hOutline | Outline context handle.
hMember | Handle of member to get the alias for.
pszAliasTable | Alias table to get the alias from. If this parameter is ESS_NULL, the default alias table is used.
ppszAlias | Buffer for the return of the alias. The buffer is allocated by the API.

Return Value

Returns 0 if successful; otherwise:

OTLAPI_BAD_ALIASTABLE

Notes

- Use EssFree() to free the alias buffer.

Example

    #include <essapi.h>
    #include <essotl.h>

    ESS_STS_T          sts = 0;
    ESS_OBJDEF_T       Object;
    ESS_HOUTLINE_T     hOutline;
    ESS_HMEMBER_T      hMember;
    ESS_STR_T          pszAlias;

    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, "100",
             &hMember);}

    if (!sts && hMember)
    {
       sts = EssOtlGetMemberAlias(hOutline,
             hMember, ESS_NULL, &pszAlias);
    }

    if (pszAlias)
    {
       EssFree(hInst, pszAlias);
    }

See Also

EssOtlSetMemberAlias()
EssOtlDeleteMemberAlias()