Creating an Error Message Table |
BOOL CreateUserErrorMessageTable(hDLL, n, ErrorMessageTable)
HINSTANCE hDLL;
unsigned int n;
char * ErrorMessageTable[ ];
CreateUserErrorMessageTable, as defined in mcadincl.h, is called when the DLL is attaching to the address space of the current process in order to register the user error message table with Mathcad. This allows error messages to be displayed when the user clicks on a UserDLL function in the same way that they are for built-in functions.
Parameter |
Description |
hDLL |
Handle of the DLL supplied by the DLL entry point routine. |
n |
Number of error messages in the table. |
An array of n strings with the text of the error messages. |
The return value is TRUE if the registration is successful. Otherwise, it is FALSE.
Use the MAKELRESULT command in your function definition to specify which errors are returns and which variables are highlighted for particular user errors.