i want to replace madshi driver and hook dll without reboot

c++ / delphi package - dll injection and api hooking
Post Reply
jgh0721
Posts: 28
Joined: Tue Apr 22, 2014 8:06 am

i want to replace madshi driver and hook dll without reboot

Post by jgh0721 »

i use MCH 3.1.13.

and i use session/systemwide injection in mch, so i cant uninjection in easily. if i do that, because of hook function in use in hook dll.

so, first, i replace mch driver and hook dll in use movefileex( REBOOT_UNTIL ) and then reboot.

but, i want to replace my files without reboot. any idea?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: i want to replace madshi driver and hook dll without reb

Post by madshi »

Once you uninjected, you should be able to rename the hook dll. Then you can copy in the new version of the dll and re-inject. You can do MoveFileEx to delete the renamed (still in use) file, but no instant reboot is needed. Of course the renaming should be clever enough to support renaming to multiple different names, so you can replace the dll version more than just once without a reboot.

Alternatively you could add a version number to the dll name, then you don't ever have to rename it.
Post Reply