Reputation: 1
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++
Upvotes: 0
Views: 1161
Reputation: 55402
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.
Upvotes: 1