CreateUserFunction

const void * CreateUserFunction(hDLL, functionInfo)
HINSTANCE hDLL;
FUNCTIONINFO * functionInfo;

CreateUserFunction, 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 function with Mathcad.

Parameter

Description

hDLL

Handle of the DLL supplied by the DLL entry point routine.

functionInfo

Points to the FUNCTIONINFO structure that contains information about the function. The FUNCTIONINFO structure has the following form:

typedef struct tagFUNCTIONINFO{

char * lpstrName;
char * lpstrParameters;
char * lpstrDescription;
LPCFUNCTION lpfnMyCFunction;
long unsigned int returnType;
unsigned int nArgs;
long unsigned int argType[MAX_ARGS];
} FUNCTIONINFO;

Return value

The return value is a non-NULL handle if the registration is successful. Otherwise, it is NULL.

This function registers the function named in FUNCTIONINFO, and defined using the LRESULT structure.