# Reflective DLL Injection using mingw compiles with no Errors, But doesn’t work

I’ve been playing around with the Reflective DLL injection code, I can compile the Dll’s in mingw easily and inject them using the original compiled binaries given here. I can also compile the Injector with no Errors, But the injector doesn’t work and gives me this on Each time, on every Process, As Administrator, And using precompiled injection dlls.

``[-] Failed to inject the DLL. Error=998 ``

Due to this I’ve tried switching my compilers (because I thought it may be it’s problem) from Mingw-64 to Mingw to TDM GCC (this one is easy to use, So I’ll keep this one). But it doesn’t work on either of them. I’m not an Msvc guy, I also don’t like Visual Studio. 🙂

Here’s how I’m compiling the injector.

``gcc GetProcAddressR.c Inject.c LoadLibraryR.c ``

The original code by Stephen fewer does not support mingw. But it’s fork the one that’s used in Meterpreter does. It can be found here, And this is what I’m using. https://github.com/rapid7/ReflectiveDLLInjection

EDIT : I’m on Windows 10 x64. But I also tried on Windows 7 32 bit. Same Error.