From: Markus Selve <MSELVE@de.ibm.com> - 2005-07-18 09:38:01
> Markus Selve wrote:
> > I really want only to use htonl(), no real operations with socket. I
> > it without WSAStartup() and it works.
> Even if you only use htonl() I still recommend that you call
> WSAStartup(). If it works despite this you are simply lucky and there
> is no guarantee that it will continue to work with future versions of
> Windows. Depending on undefined behavior is not a good practice in any
> programming environment. MSDN says explicitly that you must do this:
> The WSAStartup function must be the first Windows Sockets function
> called by an application or DLL. It allows an application or DLL to
> specify the version of Windows Sockets required and retrieve details of
> the specific Windows Sockets implementation. The application or DLL can
> only issue further Windows Sockets functions after successfully calling
Ok, then I'll call WSAStartup() first.
Thanks for the advice,