# EssOtlSetOutlineInfo

Description

EssOtlSetOutlineInfo() sets outline information.

Syntax

    ESS_FUNC_M EssOtlSetOutlineInfo (hOutline, pInfo);

ESS_HOUTLINE_T | hOutline
ESS_POUTLINEINFO_T | pInfo

Parameters

hOutline | Outline context handle.
pInfo | Pointer to a structure allocated by the caller to store outline information.

Return Value

Returns 0 if successful; otherwise one of the following:

OTLAPI_BAD_OUTLINETYPE
OTLAPI_ERR_DUPLICATEALIAS
OTLAPI_ERR_CURTOOMANYDIMS
OTLAPI_ERR_ILLEGALTAG
OTLAPI_ERR_DUPLICATENAME

Notes

- Only some of the fields of the ESS_OUTLINEINFO_T structure are used to set information. See the structure description in the "API Structures" section for more information.
- EssOtlGetOutlineInfo() should be called to initialize the fields in the ESS_OUTLINEINFO_T structure.
- If the fCaseSensitive flag in the ESS_OUTLINEINFO_T structure is being changed from ESS_TRUE to ESS_FALSE, and this causes duplicate member names, the call will fail.

Example

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

    ESS_STS_T   sts = 0;
    ESS_FALSE = 0;
    ESS_TRUE  = 1;
    ESS_POUTLINEINFO_T pInfo = ESS_NULL;
    ESS_HOUTLINE_T   hOutline;
    ESS_OBJDEF_T  Object;
    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,
          &hOutline);

    if (!sts)
    {
     sts = EssOtlGetOutlineInfo(hOutline, &pInfo);
    }

    if (!sts && Info)
    {
     pInfo->fCaseSensitive = ESS_FALSE;
     sts = EssOtlSetOutlineInfo(hOutline, pInfo);
    }

    if (pInfo)
    {
     EssFree(hInst, pInfo);
    }

See Also

EssOtlGetOutlineInfo()