Click to See Complete Forum and Search --> : WinSock


Zarathu
June 11th, 2007, 05:21 PM
Is there any way to create a TCP client and send data through the socket without having to link to the wsock32 lib?

SuperKoko
June 11th, 2007, 06:35 PM
I think that every Win32 programs using the TCP protocol will, somehow, directly or indirectly, use wsock32.dll.

What's wrong with it?

If you need a higher level protocol (e.g. HTTP or FTP), you can use WinINet, which probably indirectly uses wsock32.dll.
http://msdn2.microsoft.com/en-us/library/aa385331.aspx

For TCP, you should use wsock32.dll.

Zarathu
June 11th, 2007, 06:42 PM
What about UDP? Does UDP have to link to wsock32?

MikeAThon
June 11th, 2007, 07:31 PM
Yes.

Note that wsock32.lib is the library for Winsock version 1.0. For Winsock version 2.0 and higher (currently 2.2 I think), link to Ws2_32.lib.

Mike

Ejaz
June 12th, 2007, 01:59 AM
[ Moved Thread ]