EssOtlAddMember

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

Syntax

ESS_FUNC_M EssOtlAddMember (hOutline, pMemberInfo, hParent, hPrevSibling, phMember);
ParameterData TypeDescription

hOutline;

ESS_HOUTLINE_T

Outline context handle.

pMemberInfo;

ESS_MBRINFO_T

Member information structure defining the member and its attributes.

hParent;

ESS_HMEMBER_T

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

hPrevSibling;

ESS_HMEMBER_T

Handle of previous sibling.

phMember;

ESS_PHMEMBER_T

Handle of new member returned from the API.

Notes

Return Value

Returns 0 if successful; otherwise one of the following:

Example

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

ESS_STS_T          sts = 0; 
ESS_OBJDEF_T       Object; 
ESS_HOUTLINE_T     hOutline; 
ESS_MBRINFO_T      MbrInfo; 
ESS_HMEMBER_T      hMemberProfit; 
ESS_HMEMBER_T      hNewMember; 
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, "Profit",
         &hMemberProfit);
}
if (!sts && hMemberProfit) 
{ 
   memset(&MbrInfo, '\0', sizeof(MbrInfo)); 
   strcpy(MbrInfo.szMember, "Inventory"); 
   sts = EssOtlAddMember(hOutline, &MbrInfo,
         ESS_NULL, hMemberProfit, &hNewMember); 
}

See Also