Injecting Exported DLLs and also Injecting Imported DLLs C++

-1

I am writing a dll that has exports and also another dll that has imports (both in C++). Dll 1 creates exports that DLL 2 imports and calls. By using 2 import & exported dlls, that means i gotta inject both of them. I tried to inject the dll that has exports first, it works and running the dllmain, and then when i want to inject another dll that has imports, it throws this error when i check the error code at mdsn NTSTATUS values:

0xC0000135(STATUS_DLL_NOT_FOUND) - {Unable To Locate Component} This application has failed to start because %hs was not found

If i try to inject the DLL that has imports first, it injects and runs my test Print "Test" to console, but i don't see the DLL 1 executing dllmain. after that, it immediately crashes the main application. The injector also throws an error:

0xC0000005(STATUS_ACCESS_VIOLATION) - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

I also tried:

  • Placing the dll 1(the one that has exports) in main application directory
  • Placing both dlls in main app directory

How do i make both dlls running without crashing?

Thanks in advance.

c++
dllimport
dllexport
asked on Stack Overflow Jan 20, 2019 by ThatIsMiyu

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0