This is probably just wishful thinking...
Is there any way to check to see if an ASP/VBScript function is defined before calling it?
This is probably just wishful thinking...
Is there any way to check to see if an ASP/VBScript function is defined before calling it?
Here is my solution which works on the same principle, but the hacky-ness is pretty self-contained:
It's a slightly hacky way to do it as it relies on having set "On Error Resume Next", but you could do something like this:
The call to GetRef will generate an exception if the sub or function you're trying to get a pointer to does not exist (as is the case here with DoStuff2). You can then check if the reference was set as expected.