Originally Posted by
bad6oy30
So I've moved from out-of-process to in-process, and it's pretty damn cool. I detoured D3D9 EndScene with a wrapper DLL, that was all well and good, but now I want to get rid of the proxy and do a "live" detour.
One thing I don't understand... if you know the pointer to the IDirect3DDevice9, then you can get the pointer to the virtual EndScene method. After that, you overwrite the virtual method pointer with the addr of your hook function. Your function does the extra work, then calls the original pointer, casted to the same signature.
But I see all the asm in the detour examples, and I don't understand it... why is it necessary?