CSocket and WSAStartup  
Author Message
eggabaggs





PostPosted: Fri Jul 11 11:05:30 CDT 2003 Top

MFC >> CSocket and WSAStartup

Do I have to call WSAStartup before I can use a CSocket object? When I call
CSocket::Create(), I get the error WSANOTINITIALISED: "Either the
application hasn't called WSAStartup or WSAStartup failed." The
documentation for CSocket doesn't appear to mention this at all.

Visual Studio209  
 
 
CheckAbdoul





PostPosted: Fri Jul 11 11:05:30 CDT 2003 Top

MFC >> CSocket and WSAStartup You need to call AfxSocketInit() in your App's InitInstance() if you are
planning to use the MFC socket classes.

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------



> Do I have to call WSAStartup before I can use a CSocket object? When I
call
> CSocket::Create(), I get the error WSANOTINITIALISED: "Either the
> application hasn't called WSAStartup or WSAStartup failed." The
> documentation for CSocket doesn't appear to mention this at all.
>
>


 
 
Isaac





PostPosted: Fri Jul 11 11:09:46 CDT 2003 Top

MFC >> CSocket and WSAStartup Thanks.

"CheckAbdoul" <636865636B6162646F756C406E6F7370616D2E6D7670732E6F7267> wrote

> You need to call AfxSocketInit() in your App's InitInstance() if you
are
> planning to use the MFC socket classes.
>
> --
> Cheers
> Check Abdoul [ VC++ MVP ]
> -----------------------------------
>


> > Do I have to call WSAStartup before I can use a CSocket object? When I
> call
> > CSocket::Create(), I get the error WSANOTINITIALISED: "Either the
> > application hasn't called WSAStartup or WSAStartup failed." The
> > documentation for CSocket doesn't appear to mention this at all.
> >
> >
>
>