About call UninjectAllLibrariesW

c++ / delphi package - dll injection and api hooking

About call UninjectAllLibrariesW

Postby power888 » Sat Dec 26, 2015 8:54 am


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..

if (!UninjectAllLibrariesW(DriverNameW)) {
} else {

if (!StopInjectionDriver(DriverNameW)) {

If error happen, GetLastError value of UninjectAllLibrariesW is 31.

have some idea?

Posts: 50
Joined: Sat May 23, 2009 8:55 am

Re: About call UninjectAllLibrariesW

Postby iconic » Sat Dec 26, 2015 7:16 pm

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

Site Admin
Posts: 967
Joined: Wed Jun 08, 2005 5:08 am

Re: About call UninjectAllLibrariesW

Postby madshi » Thu Jan 21, 2016 12:55 pm

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.
Site Admin
Posts: 10266
Joined: Sun Mar 21, 2004 5:25 pm

Return to madCodeHook

Who is online

Users browsing this forum: No registered users and 24 guests