EsbOtlGetParent

Description

EsbOtlGetParent() returns the parent of a member.

Syntax

EsbOtlGetParent (hOutline, hMember, phMember)
ByVal hOutline As Long
ByVal hMember  As Long
      phMember As Long

Parameters

hOutlineOutline context handle.
hMemberHandle of member to retrieve the parent of.
phMemberReturn variable for the member handle of the parent of the hMember parameter.

Return Value

Returns 0 if successful.

Notes

Example

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

Sub ESB_OtlGetParent()
Dim sts As Long
Dim Object As ESB_OBJDEF_T
Dim hOutline As Long
Dim hMemberProfit As Long
Dim hParent 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",
    hMemberProfit) 
End If

If sts = 0 And hMemberProfit <> 0 Then
   sts = EsbOtlGetParent(hOutline, hMemberProfit, 
    hParent)
End If
End Sub

See Also

EsbOtlGetChild()
EsbOtlGetNextSibling()
EsbOtlGetPrevSibling()
EsbOtlGetFirstMember()