EssGetDefaultCalc

Gets the default calc script for the active database.

Syntax

ESS_FUNC_M EssGetDefaultCalc (hCtx, pCalcScript);
ParameterData TypeDescription

hCtx

ESS_HCTX_T

API context handle.

pCalcScript

ESS_PSTR_T

Address of pointer to receive allocated calc script string.

Return Value

If successful, this function returns the default calc script for the database in pCalcScript.

Access

This function requires callers to have at least read access (ESS_PRIV_READ) to the database, and to have selected it as their active database using EssSetActive().

Example

ESS_FUNC_M
ESS_GetDefaultCalc (ESS_HCTX_T  hCtx,
                    ESS_HINST_T hInst
                   )
{
   ESS_FUNC_M     sts = ESS_STS_NOERR;
   ESS_STR_T     cstr = NULL;
   sts = EssGetDefaultCalc(hCtx, &cstr);
   if (!sts)
   {
      if (cstr)
      {
         printf  ("Default Calc Script --\r\n%s\r\n", cstr);
         EssFree (hInst, cstr);
      }
   } 
  return (sts);
}

See Also