# EsbOtlGetNextSharedMember

Description

EsbOtlGetNextSharedMember() returns the member handle to the next shared member of the specified member.

Syntax

    EsbOtlGetNextSharedMember (hOutline, hMember, phMember)

    ByVal hOutline As Long
    ByVal hMember  As Long
          phMember As Long

Parameters

hOutline | Outline context handle.
hMember | Member to find the next shared member for.
phMember | Return variable for the next shared member in the outline. This parameter is ESB_NULL if there are no more shared members.

Return Value

Returns 0 if successful.

Notes

- If hMember is the actual member, the first shared member is returned in the phMember parameter. If hMember is a shared member, the next shared member is returned in the phMember parameter.
- If there are no (more) shared members, phMember is set to ESB_NULL and the call returns 0.

Example

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

    Sub ESB_OtlGetNextSharedMember()
    Dim sts As Long
    Dim Object As ESB_OBJDEF_T
    Dim hOutline As Long
    Dim hMargin As Long
    Dim hShared 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, "Margin", hMargin)
    End If
    If sts = 0 Then
       Do While sts = 0 And hMargin <> 0
        sts = EsbOtlGetNextSharedMember(hOutline, hMargin, hShared)
         hMargin = hShared
         hShared = ESB_NULL
       Loop
    End If
    End Sub

See Also

EsbOtlFindMember()