View Single Post
Old 16.06.2006, 12:07   #5
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

Quote:
Originally Posted by Bruenor
I believe I found the problem. The function call that gets modified in the example uses a relative offset, so replacing it with an absolute address causes it to call the wrong address. If you replace
Code:
if( !WriteProcessMemory(dwHandle, (LPVOID)(0x0050F8F4+1), &HookReceivePacket, sizeof(&HookReceivePacket), &temp) )
with
Code:
if( !WriteProcessMemory(dwHandle, (LPVOID)(0x0050F8F4+1), &HookReceivePacket - (0x0050F8F4+5), sizeof(&HookReceivePacket), &temp) )
it should work.
Thanks for the reply. I will give this a try. I was afraid it was an addressing issue, but I am still new to thinking in relative and absolute addressing ^^
mcrabben7 is offline