You shouldn’t be doing any API calls, especially for things like creating threads or windows, from DLLMain. Raymond Chen has written about this many times; here’s one that’s particularly relevant.
More Related Contents:
- Exporting functions from a DLL with dllexport
- How do I detect the DLLs required by an application?
- Programmable router
- Windows threading: _beginthread vs _beginthreadex vs CreateThread C++
- Win32 API to enumerate dll export functions?
- How to create a resizable CDialog in MFC?
- Does Windows 7 restrict folder access as Vista does?
- Precise thread sleep needed. Max 1ms error
- How to get the cpu usage per thread on windows (win32)
- C# equivalent of DllMain in C (WinAPI)
- How do I get a list of available serial ports in Win32?
- Is it a bug to pass a single-element array to SendInput?
- How do I use a third-party DLL file in Visual Studio C++?
- Enumerating threads in Windows
- Is there a way to find all the functions exposed by a dll
- Avoiding UAC but launching an elevated process using a windows service
- Are TCP SOCKET handles inheritable?
- Why is ExitProcess necessary under Win32 when you can use a RET?
- How to gracefully terminate a process?
- Can DPI scaling be enabled/disabled programmatically on a per-session basis?
- Windows 7 SDK installation failure
- Can multithreading be implemented on a single processor system?
- How to create virtual webcam in Windows 10?
- How do I find position of a Win32 control/window relative to its parent window?
- Is there a Windows equivalent of nanosleep?
- Capturing a Window that is hidden or minimized
- Waiting for grandchild processes in windows
- How do I guarantee fast shutdown of my win32 app?
- Detect external display being connected or removed under Windows 7
- How to install OpenCV 2.0 on win32