Frees memory dynamically allocated by EssOtlGetAttributeInfo() and EssOtlGetMemberInfo() for string type attribute information.
Syntax
Parameter | Data Type | Description |
---|---|---|
hOutline; | ESS_HOUTLINE_T | Handle to the outline |
structId; | ESS_ULONG_T | One of the following constant identifiers for the structure:
|
count; | ESS_ULONG_T | Number of structures |
structPtr; | ESS_PVOID_T | Pointer to memory |
Notes
Always call this function, EssOtlFreeStructure(), after you call EssOtlGetMemberInfo().
Example
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, ESS_DT_STRUCT_MBRINFO, 1, phMemberInfo); } printf("\n Attributes associated :%ld\n\n", count); }
See Also