How to hook by custom address in unmagaged code?

Apr 22, 2013 at 8:24 AM
Edited Apr 22, 2013 at 8:25 AM
I am using Visual C++ and wondering how to hook by address? Actually I am dealing with a exe file that I don't have sources. I know the function address to hook and the calling convetions (delph's fastcall), but I don't know if that is possbile to hook with address by easyhook. If yes, how to deal the function prototype? It'll be great if a sample code could be provided
Apr 22, 2013 at 10:02 AM
Edited Apr 22, 2013 at 10:04 AM
Yes you can hook from the address (all the C# examples do this using an address - it is just they are using the built-in methods of determining the address for a DLL export). There are currently no examples that show how this is done with C++, however the C# code simply calls the native implementation for the core hooking/injection stuff.

You will however have to determine the correct function signature to create your delegate - there is no automatic way to do this in EasyHook.