FUNCTIONINFO Structure |
The FUNCTIONINFO structure, defined in mcadincl.h, is used for registering a DLL function with Mathcad. It contains information about the name by which Mathcad recognizes the function, the description of the function parameters, its arguments, its return value, and the pointer to the code which executes the function.
FUNCTIONINFO Multiply =
{
"Multiply",
// The function arguments
"a,M",
// A brief description of the function
"Returns the product of the scalar a and the matrix M",
// The call to your code
(LPCFUNCTION)MyCFunctionname;
// The type of the result
COMPLEX_ARRAY,
// The number and type of the arguments
2,
{COMPLEX_SCALAR, COMPLEX_ARRAY}
In versions previous to Mathcad 8, this description was used to populate the Insert Function dialog. The code has since changed; you must update the User_EN.xml document separately to make your function definition appear in this dialog box.