user1626487
user1626487

Reputation: 1

DLL injection and create thread error

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

Answers (1)

Neil
Neil

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

Related Questions