D3D9 EndScene Hook - Crash

06/18/2014 15:05 th0rex#1
Hello guys.

Yesterday I started working on a d3d Menu for Cubeworld. I already had one and I just wanted to make a new one which is good written to improve my skills. But it always crashes and I have no idea why. The original function is fine and at a valid adress and it hooks the right function. Maybe I overlook something totally obvious. I hope you can help me. At the moment my hook does nothing more than just call the original function and it does not work.


Edit:
Heres the code at endscene and at pEndScene.

Edit 2:
Well I have no idea why but i fixxed it. I did not recreate the original 5 bytes i overwrote and now it works. Could someone explain to me why it works even tho the bytes miss in the hook ?