Partager via


Backward Compatibility for Windows Sockets 1.1 Applications

Winsock 2.2 maintains full backward compatibility with Winsock 1.1 on two levels: source and binary. This maximizes interoperability between Windows Sockets applications of any version and Winsock implementations of any version. It also minimizes problems for users of Winsock applications, network stacks, and service providers. Current Windows Sockets 1.1 Specification-compliant applications operate on a Winsock 2.2 implementation without modification of any kind, as long as at least one TCP/IP service provider is properly installed.

Source Code Compatibility

Source code compatibility means, with few exceptions, that all the Winsock 1.1 functions are preserved in Winsock 2.2.

Winsock 1.1 application source code can be moved to the Winsock 2.2 system by including the new header file, Winsock2.h, and performing a straightforward link with the appropriate Winsock 2.2 libraries.

Binary Compatibility

A major design goal for Winsock 2.2 was to enable existing Winsock 1.1 applications to work, unchanged at a binary level, with Winsock 2.2. Because Winsock 1.1 applications are TCP/IP-based, binary compatibility implies that TCP/IP-based Winsock 2.2 Transport and Name Resolution Service Providers are present in the Winsock 2.2 system.

Installation guidelines for Winsock 2.2 ensure that there is no negative impact to existing Winsock 1.0-based applications on an end-user system with the introduction of any Winsock 2.2 components.

Note   To obtain information about the underlying TCP/IP stack, Winsock 1.0 applications currently use certain members of the WSADATA structure (obtained through a call to WSAStartup). These members include****iMaxSockets**, iMaxUdpDg, and lpVendorInfo.

While Winsock 2.2 applications ignore these values because they cannot uniformly apply to all available protocol stacks, safe values are supplied to avoid breaking Winsock 1.1 applications.

See Also

Compatible Name Resolution for TCP/IP in the Windows Sockets 1.1 API

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.