It is not working. I've probably tried all the combinations. Now, since it is an extension Dll, I am calling AfxInitExtensionModule and AfxTermExtensionModule from DLL_PROCESS_ATTACH and DLL_PROCESS_DETACH respectively. But still the problem persists. ie the dll does not respond when I try to create the socket. Plz check it out, if you could. Thanks