EssOtlVerifyFormula

Verifies that an outline is correct. This function returns both global outline errors and errors for each incorrect member. This function is called by EssOtlVerifyOutlineEx, but can also be called directly from a client program.

Syntax

ESS_FUNC_M EssOtlVerifyFormula (hOutline, hCtx, FormulaString, pErrorNumber, pErrorLine, MemberName, ErrorBufferLength, ErrorMessage);
ParameterData TypeDescription

hOutline

ESS_HOUTLINE_T

Outline context handle.

hCtx

ESS_HCTX_T

API context handle. If the outline is a local outline, it is necessary to also provide this separate hCtx to a running server, because formula checking only is done on the server, and outlines from the file system do not have a server connected to them. This parameter should normally be NULL.

FormulaString

ESS_STR_T

The syntactic formula expression.

pErrorNumber

ESS_PULONG_T

Pointer to the count of errors.

pErrorLine

ESS_PULONG_T

Pointer to the error line number.

MemberName

ESS_STR_T

Name of member that has the formula. This is an optional field. Supplying it will enhance the error message, especially if EssOtlVerifyFormula() is called within a loop.

ErrorBufferLength

ESS_ULONG_T

The size of the error buffer.

ErrorMessage

ESS_STR_T

The error message contained in the error buffer. This is a pre-allocated string which contains a descriptive message of any error (including error number, line number, and member name). It should be set to a length of at least 400 bytes.

Notes

Return Value

This function returns zero if successful, otherwise it returns an error code of either OTLAPI_ERR_HOUTLINE or OTLAPI_NULL_ARG. The return value can be zero even in the case of minor errors in the formula. A non-zero return value indicates a serious code-level error.

Any formula error is returned in the pErrorNumber and pErrorLine variables.

A non-zero return value indicates a serious code-level error in which case the error checking has been interrupted and pErrorNumber and pErrorLine both are set to zero.

See Also