Hey,
Ich hab ein Problem glBegin zu detouren.
Der Fehler:
"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."
Nun hab ich bereits __stdcall, __fastcall, __cdecl versucht, jedes mal der gleiche Fehler.
Was mache ich falsch? Gibt es noch andere "Calling convention"´s ?
Code:
Danke schonmal im voraus
EDIT:
Mit etwas probieren hab ich es Herausgefunden!
APIENTRY ist die passende "calling convention"
Trotzdem danke =)
Ich hab ein Problem glBegin zu detouren.
Der Fehler:
"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."
Nun hab ich bereits __stdcall, __fastcall, __cdecl versucht, jedes mal der gleiche Fehler.
Was mache ich falsch? Gibt es noch andere "Calling convention"´s ?
Code:
Code:
void __cdecl myGlBegin( GLenum mode ){
if(!noticed){
MessageBoxA(0, "Injected =)", "TEST", MB_OK);
noticed = true;
}
sys_glBegin(mode);
}
...
sys_glBegin = reinterpret_cast<func_glBegin_t>(DetourFunction((PBYTE)&GetProcAddress(lib, "glBegin"), (PBYTE) &myGlBegin));
Danke schonmal im voraus
EDIT:
Mit etwas probieren hab ich es Herausgefunden!
APIENTRY ist die passende "calling convention"
Trotzdem danke =)