I have been able to find the problem myself by remaining to search using google. It seems when you create a standard MFC-Exe project with the Classwizzard it automatically adds this code to the function InitInstance:
if (!AfxSocketInit())
{ AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return...
I've tried to create the object in several ways. In my original ActiveX the CAsyncSocket object is a member variable of the COleControl and I create it on the heap.
I can trace into the mfc to see what happens. This MFC function returns FALSE:
BOOL CAsyncSocket::Create(UINT nSocketPort, int...
This is puzzling my now for quite some time now. I can't seem to make any TCP/IP connection from my ActiveX component using the CAsyncSocket class. Somehow the CAsynSocket::Create() returns FALSE but I don't know why.
Even when I create a fresh new ActiveX component and add this code I can't...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.