Cexpression

int Cexpression(wchar_t *expression,uchar *cexpr,int nexpr,int *explen,wchar_t *err,ulong mode);

Compiles expression to intermediate form. Precompiled expressions can be estimated up to 50 times faster than expressions calculated directly from the text string. Note that format of the intermediate code may change in the subsequent OllyDbg version. If you want to keep precompiled expressions between the sessions, always check the version.


Parameters:

expression
(in) Pointer to the expression, zero-terminated UNICODE string. The syntax of  expressions is described here
cexpr
(out) Pointer to the buffer that receives the precompiled expression.
nexpr
(in) Length of the buffer cexpr in bytes. In most practical cases, nexpr = TEXTLEN is sufficient
explen
(out) Optional pointer to the variable that receives the length of the precompiled expression in bytes, or NULL if exact length of the precompiled expression is not important
err
(out) Pointer to the UNICODE buffer of length TEXTLEN wide characters that receives the error message. This parameter can't be NULL
mode
(in) Compilation mode, combination of zero or more of the following flags:
EMOD_CHKEXTRA - reports error "Extra characters on line" if the first non-blank symbol
after syntactically complete expression of maximal length is neither '\0' nor semicolon (starts comment)
EMOD_MULTI - allows explanations and multiple subexpressions


Return values:

Number of processed UNICODE characters in expression. If expression is syntactically invalid, this is roughly the location of the syntax error. On success, err is cleared (err[0] is set to 0). On error, err contains error message.


Example:

See Eexpression().


See also:
Expressions, t_result, t_watchEexpression(), Exprcount(), Expression()Fastexpression()