Conclusion
The Visual Basic Winsock control is useful for simple, non-critical applications that require network communication. A few problems with the Visual Basic 5 version of the control make successfully programming the control difficult, but most of the major problems have been corrected in the latest version of Visual Basic. The control offers the capability to add simple network communication to a Visual Basic application with relatively little effort. Of course, the control is limited in its overall capabilities, and applications that require a great deal of interaction with Winsock should consider either manually importing the necessary functions and constants from the Winsock DLL or use the new .NET Application Frameworks interface. As we mentioned earlier, we have provided some Winsock Visual Basic examples throughout the Winsock chapters that do in fact import Winsock functions from WS2_32.DLL. For examples, see the TCPClient, TCPServer, UDPSender, and UDPReceiver applications under the Chapter 1 Visual Basic directories of samples and their WINSOCK.BAS file.