I've read in several sources that CreateProcess
must not be called from a DllMain
function.
Do not call CreateProcess from a DllMain function. This causes the application to stop responding.
Dynamic-Link Library Best Practices:
You should never perform the following tasks from within DllMain: Call CreateProcess. Creating a process can load another DLL.
Question
Why is that? it states that it causes the application to stop responding but this is just a symptom. what is the real reason?
The reason I'm asking is that I tried creating a process from a DllMain
function and it sees to work just fine.