About call UninjectAllLibrariesW

c++ / delphi package - dll injection and api hooking
Post Reply
power888
Posts: 54
Joined: Sat May 23, 2009 8:55 am

About call UninjectAllLibrariesW

Post by power888 »

Hi..

I have some problem during UninjectAllLibrariesW.
(used 3.1.8 version, and compiler is VS 2012)

I have 2 projects.
and one is worked well for UninjectAllLibrariesW, and another have fail.

source part is..

InitializeMadCHook();
if (!UninjectAllLibrariesW(DriverNameW)) {
OutputDebugStringW(dbgStr);
} else {
OutputDebugStringW(dbgStr);
}

if (!StopInjectionDriver(DriverNameW)) {
:
:

If error happen, GetLastError value of UninjectAllLibrariesW is 31.

have some idea?

Regards
iconic
Site Admin
Posts: 1065
Joined: Wed Jun 08, 2005 5:08 am

Re: About call UninjectAllLibrariesW

Post by iconic »

Even though you're using v3.1.8 this post might help you (v3.1.6 is used there but seems to match the error code) viewtopic.php?f=7&t=27796

--Iconic
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: About call UninjectAllLibrariesW

Post by madshi »

Another potential issue could be that UninjectAllLibraries only succeeds if it was called by the same EXE file (hash check) which originally initiated the injection. This is an intentional feature to protect e.g. security software hook dlls from being uninjected by malware.
Post Reply