0

I have some problem with DLL injection and creation thread. So i simply attach my DLL to some process, and in main function of DLL I am trying to create thread. I tried several methods boost::thread::join(), std::thread::join() (after joining target application hangs), CreateThread(...),_beginthread() - my target application is ruining down. Please, tell me, why I cannot start thread after injection? (DLL injection is successful, I have this problems after starting a thread) And is it possible to solve this problem?

Where should I look for?

Platform win32, MSVC++

BenMorel
  • 34,448
  • 50
  • 182
  • 322
  • I know this is old but take a look at http://stackoverflow.com/questions/13428881/calling-a-function-in-an-injected-dll for something that might help yout – lfxgroove May 11 '14 at 08:37

1 Answers1

1

Don't do anything scary in your DllMain as it runs while the loader lock is held. You might get away with calling CreateThread, but the thread won't even start until DllMain returns.

Neil
  • 54,642
  • 8
  • 60
  • 72