This code makes it possible to use function pointers (no, not OBJPtr) basic funciton pointers, in VB.
It uses two API calls. Basically, it uses a window callback as the entry point for your new function, redirecting the window call to the function supplied.
A little out of the norm, but a handy thing to have when callbacks to non-objects is needed.
If you are attempting to call objects back, I recommend either the undocumented ObjPtr() or CallByName (when you know the name of the object function to call)
Inputs
No inputs
Assumes
Nothing, absolutely nothing.
Returns
No Returns, just reap the benefits.
Side Effects
None that I know of, been using this for two years.
API DeclarationsDeclare Function CallWindowProc& Lib "user32" Alias "CallWindowProcA" (ByVal
lpPrevWndFunc&, ByVal hWnd&, ByVal Msg&, ByVal wParam&, ByVal lParam&)
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpvDest As Any,
lpvSource As Any, ByVal cbCopy As Long)