EssOtlFreeStructure() frees memory dynamically allocated by EssOtlGetAttributeInfo() and EssOtlGetMemberInfo() for string type attribute information.
ESS_FUNC_M EssOtlFreeStructure (hOutline, count, structId, structPtr);
ESS_HOUTLINE_T | hOutline; |
ESS_ULONG_T | count; |
ESS_ULONG_T | structId; |
ESS_PVOID_T | structPtr; |
hOutline | Handle to the outline |
count | Number of structures |
structId | One of the following constant identifiers for the structure:
|
structPtr | Pointer to memory |
void ESS_OtlGetAssociatedAttributes() { ESS_STS_T sts = ESS_STS_NOERR; ESS_SHORT_T index; ESS_USHORT_T count; ESS_OBJDEF_T Object; ESS_APPNAME_T szAppName; ESS_DBNAME_T szDbName; ESS_OBJNAME_T szFileName; ESS_HOUTLINE_T hOutline; ESS_PPHMEMBER_T hMember; ESS_PPHMEMBER_T phMember; ESS_PPMBRINFO_T phMemberInfo; ESS_MBRNAME_T mbrName; 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); printf("EssOtlOpenOutline() sts: %ld\n",sts); sts = EssOtlFindMember(hOutline, "100-10", &hMember); printf("EssOtlFindMember() sts: %ld\n",sts); sts = EssOtlGetAssociatedAttributes(hOutline, hMember, &count, &phMember); printf("EssOtlGetAssociatedAttributes() sts: %ld\n",sts); /* Allocate memory for an array of memberinfo structs */ sts = EssAlloc(hInst,count * (sizeof(ESS_MBRINFO_T)), (ESS_PPVOID_T)&phMemberInfo); if (!sts) { for(index = 0; index < count; index++) { /* Step through array of member handles, and assign member */ sts = EssOtlGetMemberInfo(hOutline,phMember[index],&phMemberInfo[index]); printf("EssOtlGetMemberInfo() sts: %ld\n",sts); strcpy(mbrName,phMemberInfo[index]->szMember); printf("Associated attribute member name #%d is: %s\n",(index + 1),mbrName); } EssFree(hInst, phMember); EssOtlFreeStructure(hOutline, 1, ESS_DT_STRUCT_ATTRSPECS, phMemberInfo); } printf("\n Attributes associated :%ld\n\n", count); }
EssCheckAttributes()
EssFreeStructure()
EssGetAssociatedAttributesInfo()
EssGetAttributeInfo()
EssGetAttributeSpecifications()
EssOtlAssociateAttributeDimension()
EssOtlAssociateAttributeMember()
EssOtlDisassociateAttributeDimension()
EssOtlDisassociateAttributeMember()
EssOtlFindAttributeMembers()
EssOtlGetAssociatedAttributes()
EssOtlGetAttributeInfo()
EssOtlGetAttributeSpecifications()
EssOtlQueryAttributes()
EssOtlSetAttributeSpecifications()