by Andreas Echstein (1 Submission)
Category: VB function enhancement
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
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.
Code Returns
The return value of the Function must be long, of course.