# EssOtlGetPrevSibling

Description

EssOtlGetPrevSibling() returns the previous sibling of a member.

Syntax

    ESS_FUNC_M EssOtlGetPrevSibling (hOutline, hMember, phMember);

ESS_HOUTLINE_T | hOutline
ESS_HMEMBER_T | hMember
ESS_PHMEMBER_T | phMember

Parameters

hOutline | Outline context handle.
hMember | Handle of member to retrieve the previous sibling of.
phMember | Pointer for return of a member handle of the previous sibling of the hMember parameter.

Return Value

Returns 0 if successful.

Notes

- If there is no previous sibling, *phMember is set to ESS_NULL and the call returns 0.

Example

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

    ESS_STS_T          sts = 0;
    ESS_HOUTLINE_T     hOutline;
    ESS_HMEMBER_T      hMemberFeb;
    ESS_HMEMBER_T      hMemberSibling;
    ESS_OBJDEF_T       Object;
    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, "Feb",
          &hMemberFeb);
    }

    if (!sts  && hMemberFeb)
    {
       sts = EssOtlGetPrevSibling(hOutline,
             hMemberFeb, &hMemberSibling);
    }

See Also

EssOtlGetNextSibling()
EssOtlGetParent()
EssOtlGetChild()
EssOtlGetFirstMember()