AddressOf Operator

Returns a function pointer for any method. This can be used with the Declare statement to provide a callback function to some external library.

# Notes

# Syntax

pointer=AddressOf methodName

Part | Description
--- | ---
pointer | Pointer to methodName.
methodName | Method to which you want a pointer.

If your callback function raises spurious StackOverflowExceptions, the system may be calling it from a separate thread, confusing REALbasic's stack overflow checker. To correct this problem, add the statement:

#Pragma StackOverflowChecking False

to the beginning of your callback function.

# See Also

MemoryBlock function; Declare statement.