Acquiring standard WinAPI features is relatively safe, as they will not change much in the near future, if at all, since Microsoft does this best to maintain WinAPI compatibility between versions. The standard WinAPI connection, I would say, is generally stable and secure.
Involving anything else, as well as the internal components of the target program, is a completely different story. Regardless of the target program, binding itself is usually a solid practice. The weakest link in the process usually finds the right spot, and hangs on it.
The smallest change in the application can and will change the addresses of functions, not to mention dynamic libraries, etc.
In gamehacking, where binding is standard practice, this is somewhat defeated by sigscanning, a technique first developed by LanceVorgin on a somewhat infamous MPC. It works by scanning the executable image for the static parts of the function, the actual bytes of the commands that will not be changed, if only the action of the function changes. Sigscanning is obviously better than using static address tables, but in the end it will also work when the target application is changed.
An example implementation of sigscanning in C ++ can be found here .
anon6439
source share