Rolf Magnus wrote:
[...]
Why do you think you need something like that, or IOW: what are you trying
to do?
I'm injecting my code in to binary file at run time with the Microsoft
Detours library. This binary file has a number of classes of which I'd
like to create objects.
Suppose at address 0x0040703B there is a function CMyClass::CMyClass().
I have a class in my code called CDetourMyClass. I need
CDetourMyClass to call the function at 0x0040703B so that a
CDetourMyClass will be constructed in the same way as a CMyClass.
As for simply creating a void *ptrCMyClass__CMyClass() that points to
0x0040703B and calling that in the constructor of CDetourMyClass,
ptrCMyClass__CMyClass() returns the same address to my code as it will
the next time it (CMyClass::CMyClass()) is called by the binary.
I don't think I'm going about this the right way, and I'm open to
suggestions.