Hello,
I want to make a SDL proxy DLL, which 'wrote' over a graphic surface.
The idea was to intercept the SDL call to SDL_UnlockSurface to get the pointer to the surface and to add my data,
For this, i use the 'dll proxy' method (substitution of the original dll by mine)
Link :
Create your Proxy DLLs automatically - CodeProject
To test this, i create a graphic SDL project a try to get the fonction "SDL_Delay"
Code:
SDL_Delay(Uint32 time)
void function with only 1 argument (Uint32)
And for my dll i try this :
Code:
extern "C" void __stdcall __E__33__(int ms)
{
typedef void (__stdcall *pS)(int);
pS pps = (pS)p[33*4];
pps(ms);
}
and it plant every time...
but if i don't try to get arguments, it work !
Code:
extern "C" __declspec(naked) void __stdcall __E__33__()
{
VarTest = VarTest +1
__asm
{
jmp p[33*4];
}
}
And the VarTest increase...
So, did somebody get an idea ?
To finish, i want to apologize for my very very bad English, I made my best to be understandable