Gets the default calc script for the active database.
Syntax
ESS_FUNC_M EssGetDefaultCalc (hCtx, pCalcScript);
Parameter | Data Type | Description |
---|---|---|
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.
The returned calc script string will be less than 64 KB long.
The memory allocated for pCalcScript should be freed using EssFree().
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