ValidateFunctionPtr (open)
Validates a macro/function pointer
Syntax
// Core function, no LOADLIB necessary
BOOLEAN FUNCTION ValidateFunctionPtr(MACRO PTR funcptr, INTEGER returntypeid, INTEGER ARRAY parametertypeids)Parameters
MACRO PTR funcptrFunction pointer to tests
INTEGER returntypeidRequired return type, set to VARIANT to ignore. The return type of a MACRO is 0
INTEGER ARRAY parametertypeidsTypes of parameters that is given to the function pointer.
Return value
BOOLEANReturns whether the parameters can all be casted to their wanted types, and the return value can be casted to the desired type.
Description
This function tests whether a function pointer can accept certain types of parameters, and if the type of its return value meets the expectations.