Google-Code-Fork / tibiaapi

Automatically exported from code.google.com/p/tibiaapi
MIT License
0 stars 0 forks source link

TibiaAPI_Inject.dll Uninjection Routine #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I did some testing and this is what I've come up with. I am able to inject,
uninject, reinject and everything works fine without any pop ups. I can
inject, uninject, stop debugging, start debugging again, reinject and
everything works fine without pop ups.

In Core.cpp in the PipeOnRead function add a new case to use UninjectSelf:
    case 0xD:
        UninjectSelf(hMod);

In Client.DllHelper.cs:
    public void DisconnectPipe()
    {
        byte[] removeByte = { 0x2, 0x0, 0x5, 0x0 }; //create an Inject
Display packet
        pipe.Send(new NetworkMessage(removeByte));  //send the packet to
remove the hook calls(?)
        byte[] uninjectByte = { 0x2, 0x0, 0xD, 0x0 }; //create an
UninjectSelf packet
        pipe.Send(new NetworkMessage(uninjectByte));  //send the packet to
uninject the dll
        pipe = null; //null the pipe so it can be reused in
client.Dll.InitializePipe()
    }

Original issue reported on code.google.com by joebingham07@gmail.com on 16 Apr 2009 at 4:33

GoogleCodeExporter commented 9 years ago
How does this issue relate to issue 121? Does it fix issue 121? If so, please 
check
in the fix and mark both issues as closed. Don't be afraid to check in to the 
SCM; we
have it for a reason, and rollbacks are easy if something goes horribly wrong.
/Tangent. Great work joe, once again!

Original comment by ian320 on 16 Apr 2009 at 12:35

GoogleCodeExporter commented 9 years ago
Does that also remove any existing context menus/screen text?

Original comment by ian320 on 16 Apr 2009 at 1:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes it does remove existing context menus and screen text and it also fixes 
issue 121
if you call DisconnectPipe before closing your app. But like I said in my 
comment in
issue 121, even after following your steps my client doesn't freeze.

Original comment by joebingham07@gmail.com on 16 Apr 2009 at 2:43