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 funcptr

Function pointer to tests

INTEGER returntypeid

Required return type, set to VARIANT to ignore. The return type of a MACRO is 0

INTEGER ARRAY parametertypeids

Types of parameters that is given to the function pointer.

Return value

BOOLEAN

Returns 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.