VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Call Function by Address

Andreas Echstein  (1 Submission)   VB function enhancement   Advanced   Wed 3rd February 2021

Call any Function by its address, API functions inside Dlls as well as your own Functions. Number of parameters is adjustable.
How to use: Just call CallByAddress with a pointer to the function and a parameter-array.
Example included.
How it works:
The windows api-function CallWindowProc will be used to call a small assembler-function which takes care of everithing for you.

Inputs
All inputs are of 4 bytes, representating a long or dword.

Assumes
This comes in handy when you want to write Plugins for programs that are written in C/C++ and give you some kind of Callback-Address. With this code you can easily add the ability to call fuction pointers to VB.

Returns
The return value of the Function must be long, of course.

Rate Call Function by Address (5(5 Vote))

Download Call Function by Address

Call Function by Address Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters