INFO: Sockets Applications on Microsoft Windows Platforms (124876)



The information in this article applies to:

  • Microsoft Platform Software Development Kit (SDK) 1.0
  • Microsoft Win32 Software Development Kit (SDK) 3.1
  • Microsoft Win32 Software Development Kit (SDK) 3.5
  • Microsoft Win32 Software Development Kit (SDK) 3.51
  • Microsoft Win32 Software Development Kit (SDK) 4.0
  • Microsoft Win32s 1.2
  • Microsoft Windows Software Development Kit (SDK) 3.1

This article was previously published under Q124876

SUMMARY

This article documents the resources necessary to do Winsock development on the different Microsoft Windows platforms. The key components necessary for Winsock programming are:
  • TCP/IP networking support
  • A Windows Sockets include file
  • A Windows Sockets import library
  • The Windows Sockets Architecture specification.
NOTE: Some implementations of Windows Sockets may support additional protocols, and TCP/IP will not be strictly necessary. See the documentation from your vendor for more information.

MORE INFORMATION

Where you get the necessary components for Winsock programming depends on what platform you are using.

Microsoft Windows NT Versions 4.0 and beyond
Microsoft Windows 98
Microsoft Windows 95 with Winsock 2 update

Header filename: WINSOCK2.H
Import library name: WS2_32.LIB

The Winsock 2 header file, import library, and specification are all supplied as part of the Platform SDK which can be purchased as part of the Microsoft Developer Network Level 2 subscription. On these platforms, the Winsock 1 interface is still supported but not recommended. If you have to use the Winsock 1 interface on these platforms, use WINSOCK.H and WSOCK32.LIB from the Platform SDK.

Microsoft Windows NT Versions 3.1 and 3.5 and Windows 95

Header filename: WINSOCK.H
Import library name: WSOCK32.LIB

If you are using Microsoft Windows NT version 3.1 or 3.5, the TCP/IP protocol is provided as a component of the operating system. Please see your operating system documentation for more information about installing TCP/IP support for Microsoft Windows NT.

The Winsock header file, import library, and specification are all supplied as part of the Win32 SDK. If you do not have the Win32 SDK, it can be purchased as part of the Microsoft Developer Network Level 2 subscription.

The header file and import library are also supplied with the 32-bit editions of Visual C++. Visual C++ does not include the Windows Sockets specification.

Microsoft Windows for Workgroups Version 3.11

Header filename: WINSOCK.H
Import library name: WINSOCK.LIB

Windows for Workgroups does not include support for the TCP/IP protocol. However, Microsoft does provide a TCP/IP protocol for Windows for Workgroups free of charge. The following file is available for download from the Microsoft Download Center:
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

The header file and library for Winsock programming are not included with Visual C++ for Windows.

Microsoft Windows Versions 3.0, 3.1, and 3.11

Header filename: Probably WINSOCK.H (determined by vendor)
Import library name: Probably WINSOCK.LIB (determined by vendor)

TCP/IP support on these versions of Microsoft Windows will have to come from the underlying network. Your network vendor can tell you what TCP/IP support is available.

Depending on your network and the TCP/IP implementation, you may also need to get the Winsock header and library files from your vendor. However, while not guaranteed, the files supplied in WSA16.EXE (see above) may work on your implementation.

Microsoft Win32s Version 1.2

Header filename: WINSOCK.H
Import library name: WSOCK32.LIB

A Winsock application running on Win32s will use the networking support of the underlying system. See the appropriate section above for information about TCP/IP support on the host platform.

The header file, import library, and specification will be part of the Win32 SDK from which the Win32s application was created. See the section on Windows NT above for more information.

Modification Type:MinorLast Reviewed:7/11/2005
Keywords:kbAPI kbinfo kbnetwork kbWinsock KB124876 kbAudDeveloper