EssOtlQueryObjects

Returns an array of object handles of the specified type for the input object names, or if the *pcount is zero, then it returns all the object handles.

Syntax

ESS_FUNC_M EssOtlQueryObjects(hOutline, objType, objNames, pcount, ppObjHandles)
ParameterData TypeDescription

hOutline

ESS_HOUTLINE_T

Outline handle (Query mode only)

objType

ESS_OBJECT_TYPES

Object type:

  • OBJECT_SMARTLIST

    Object type is Text List (SmartList)

objNames

ESS_PSTR_T

Array of object names to be queried

pcount

ESS_PULONG_T

Count of object names. If pcount is zero, this contains the number of Text List (SmartList) handles on execution.

ppObjHandles

ESS_PPHOBJECT_T

Array of object handles

This must be de allocated using EssOtlFreeObjectArray

Return Value

Returns:

Example

void TestFreeObjectArray()
{
	ESS_STS_T					sts = ESS_STS_NOERR;
	ESS_HOUTLINE_T			hOutline = ESS_NULL;
	ESS_OBJDEF_T				Object;
	ESS_STR_T					objNames[1];
	ESS_OBJECT_TYPES		objType;
	ESS_ULONG_T				count;
	ESS_PHOBJECT_T			hObjHandles = ESS_NULL;

	memset(&Object, '\0', sizeof(Object)); 
	Object.hCtx = 			hCtx;
	Object.ObjType = 		ESS_OBJTYPE_OUTLINE;
	Object.AppName = 		szAppName;
	Object.DbName = 		szDbName;
	Object.FileName = 	szFileName;
 
	/* Set up */
	sts = EssOtlOpenOutlineQuery(hCtx, &Object, &hOutline);
 	count = 2;
	objType = OBJECT_SMARTLIST;
	objNames[0] = "Smartlist1";
	objNames[1] = "Smartlist2";

	/* Query objects */
	sts = EssOtlQueryObjects(hOutline, objType, 
					objNames, &Count, &hObjHandles);

	/* Free object array */
	if(hObjHandles)
	{
		sts = EssOtlFreeObjectArray(hOutline, count, hObjHandles);
	}
	
	/* Close outline */
	sts = EssOtlCloseOutline(hOutline);
}

See Also