EsbOtlAddMember

Adds a member to the outline and sets the member's attributes.

Syntax

EsbOtlAddMember (hOutline, pMemberInfo, hParent, hPrevSibling, phMember)
ByVal hOutline     As Long
      pMemberInfo  As ESB_MBRINFO_T
ByVal hParent      As Long
ByVal hPrevSibling As Long
      phMember     As Long
ParameterDescription

hOutline

Outline context handle.

pMemberInfo

Member information structure defining the member and its attributes.

hparent

Handle of parent. This field is used only if the hPrevSibling field is ESB_NULL.

hPrevSibling

Handle of previous sibling.

phMember

Handle of new member returned from the API.

Notes

Return Value

Returns 0 if successful; otherwise one of the following:

Example

Declare Function EsbOtlAddMember Lib "ESBOTLN"
(ByVal hOutline As Long, pMemberInfo As ESB_MBRINFO_T,
ByVal hParent As Long, ByVal hPrevSibling As Long,
phMember As Long) As Long

Sub ESB_OtlAddMember()
Dim sts As Long
Dim Object As ESB_OBJDEF_T
Dim hOutline As Long
Dim MbrInfo As ESB_MBRINFO_T
Dim hMemberProfit As Long
Dim hNewMember 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
   MbrInfo.szMember = "Inventory"
    sts = EsbOtlAddMember(hOutline, MbrInfo,
     ESB_NULL, hMemberProfit, hNewMember)
End If
End Sub

See Also