# EsbOtlGetNextSibling

Description

EsbOtlGetNextSibling() returns the next sibling of a member.

Syntax

    EsbOtlGetNextSibling (hOutline, hMember, phMember)

    ByVal hOutline As Long
    ByVal hMember  As Long
          phMember As Long

Parameters

hOutline | Outline context handle.
hMember | Handle of member to retrieve the sibling of.
phMember | Return variable for the handle of the sibling of the hMember parameter.

Return Value

Returns 0 if successful.

Notes

- If there is no next sibling, phMember is set to ESB_NULL and the call returns 0.

Example

    Declare Function EsbOtlGetNextSibling Lib
    "ESBOTLW" (ByVal hOutline As Long, ByVal hMember As Long,
    phMember As Long) As Long

    Sub ESB_OtlGetNextSibling()
    Dim sts As Long
    Dim Object As ESB_OBJDEF_T
    Dim hOutline As Long
    Dim hChild As Long
    Dim hNextSibling As Long

    Object.hCtx = hCtx
    Object.Type = ESB_OBJTYPE_OUTLINE
    Object.AppName = "Sample"
    Object.DbName = "Basic"
    Object.FileName = "Basic"

    sts = EsbOtlOpenOutline(hCtx, Object,
    ESB_YES, ESB_YES, hOutline)

    If sts = 0 Then
       sts = EsbOtlFindMember(hOutline, "Profit", hChild)
    End If

    If sts = 0 And hChild <> 0 Then
       sts = EsbOtlGetNextSibling(hOutline, hChild, hNextSibling)
    End If
    End Sub

See Also

EsbOtlGetPrevSibling()
EsbOtlGetParent()
EsbOtlGetChild()
EsbOtlGetFirstMember()