DLLMain()でWSAStartup()/WSACleanup()を呼ぶのは御法度のようです。
http://msdn.microsoft.com/en-us/library/aa290048.aspx
---
The following operations are specifically identified as being unsafe inside a DllMain function under most circumstances:
* Calling the LoadLibrary, LoadLibraryEx, or FreeLibrary functions directly or indirectly.
* Calling the registry functions.
* Calling imported functions other than those located in Kernel32.dll.
* Communication with other threads or processes.
---