Hello,
I'm making a midhook but I never did it. So some part I never did before.
I can't get the addie to the function that I want to load.
I want to load this function:
Code:
DWORD test() {
std::cout << "test";
}
Yes I know, I need to asm the jmp back and more. But I want to do this first.
I want to get the addie to that function this way:
Code:
DWORD pointertofunction;
DWORD (*pointertofunction)() = test; //Destination
I get they's errors:
Code:
1>main.cpp(31): error C2373: 'pointertofunction' : redefinition; different type modifiers
1> main.cpp(29) : see declaration of 'pointertofunction'
Can some one tel me how to do this ride? Or can some one give me from a other game a midhook that works? Becouse I want to learn how to do it, I don't want the code.