SocketTools 11 Upgrade Information  
 

This section will help you upgrade an application written using a previous version of the SocketTools Library Edition. In most cases, the modifications required will be minimal and may only require a few edits and recompiling the program. However, it is recommended that you review this entire document so that you understand what changes were made and how those changes can be implemented in your software.

Supported Platforms

SocketTools 11 is supported on Windows 7, Windows Server 2008 R2 and later versions. Earlier versions of the operating system, including Windows XP and Windows Vista are no longer supported by Microsoft and cannot be used with SocketTools. We recommend using the lasted release of either Windows 10 or Windows 11.

Developers who are redistributing applications which target Windows 11 or Windows Server 2025 should upgrade to ensure compatibility with the platform and current development tools. Secure connections require TLS 1.2 or later and most services will no longer accept connections from a client using SSL 3.0 or TLS 1.0.

Development Tools

As standard Windows dynamic link libraries, SocketTools 11 may be used with virtually any programming language which can call exported functions in a DLL, either by name or by ordinal. Import libraries are provided for Visual C++ in both x86 and x64 COFF format, and for Borland's C++ compilers in OMF32 and ELF64 format. Other languages should use the conventions appropriate for calling an exported function, such as the Declare statement in Visual Basic. Although the libraries may be used with .NET languages, it is recommended you use the SocketTools .NET Edition if you are creating applications for the .NET Framework.

SocketTools Header Files

In SocketTools 11 all of the library constants, functions and C++ classes are in a single header file named cstools11.h. This header file also includes the error codes that are defined in a separate header file named cserror11.h. There are three special macros that can be defined to control how applications are built using the SocketTools libraries:

CSTOOLS_NO_LIBRARIES

Visual C++ and Borland C++ supports a pragma which can be used to automatically specify the names of libraries that the compiler should attempt to link with in order to resolve function calls. By default, it is not necessary to explicitly specify the names of the SocketTools import libraries to link to. However, if you wish to explicitly link to specific import libraries, then define this macro prior to including the cstools11.h header files.

CSTOOLS_NO_NAMESPACE

When compiling a C++ application, the SocketTools functions are defined in a namespace called SocketTools. This prevents the possibility of conflicts with functions of the same name that may be used in other libraries. If you prefer the functions to be defined in the global namespace instead, then define this macro prior to including the cstools11.h header file.

CSTOOLS_NO_CLASSES

When compiling a C++ application, class wrappers for the SocketTools API are automatically included by default. Defining this macro prevents this, and only the API function prototypes will be declared. It is important to note that this only affects programs written using C++. The class wrappers will not be included for standard C programs, regardless if this macro is defined or not.

SocketTools C++ Class Wrappers

The C++ class wrappers for the SocketTools libraries have been moved from a separate file into the cstools11.h header file, and are now automatically included whenever a C++ program is compiled. The classes have been designed for compatibility with a variety of C++ compilers; however, there are certain features which are only available if the application is compiled using the Microsoft Foundation Classes (MFC) or Active Template Library (ATL). For example, if an application is built using MFC, each class is derived from CObject and there are additional overloaded methods implemented which support the use of objects like CString. If the application is built without using MFC, or a different C++ compiler is used, those methods will not be available.

Upgrading Projects

If you are upgrading from earlier versions, most applications will be source code compatible with the SocketTools 11 API. In most cases, all you will need to do is install the current version, update the header file and import library references, and then recompile your application. Note that the library file names have changed, as have the export function ordinals. If your build projects use the SocketTools10 environment variable to specify the location of the header files and import libraries, you need to change it to use SocketTools11. This environment variable is automatically defined during the installation process.

The SocketTools 11 libraries are not binary compatible with the earlier versions of the SocketTools libraries and cannot be used as drop-in replacements. If you have declared functions by ordinal in your application (something not typically done), those values have changed and must be updated. If you have declared the exported functions by name, you will be able to reference the new libraries using the same names.

Your runtime license key has changed for SocketTools 11, which will require you to define the new key in your application when calling the initialization functions for each API. As with previous versions of SocketTools, you can use the License Manager utility to generate a file which contains the runtime key you should use. The SocketTools 10 and earlier runtime license keys are not valid for the version 11 libraries and an error will be returned if an invalid runtime key is specified.

With SocketTools 11, secure connections will use TLS 1.2 or later. By default, the libraries will not support connections to servers which use older, less secure versions of TLS or any version of SSL. They will also no longer use weaker cipher suites that incorporate insecure algorithms, such as RC4 or MD5. For applications that require secure connections, it is recommended you use the current build of Windows 10 or Windows 11 with all security updates applied.

It is possible to force the APIs to use earlier versions of TLS for backwards compatibility with older servers. This is done by explicitly setting the dwProtocol member of the SECURITYCREDENTIALS structure to specify the protocol version required. However, this is not generally recommended because using SSL 3.0 or TLS 1.0 may cause servers to immediately reject the connection attempt.

The following lists the changes that developers should be aware of when migrating from earlier versions:

  • The name of the primary header file is cstools11.h and the cserror11.h header file defines the error code values. The csrtkey11.h header file defines the runtime license key for this version of SocketTools. The runtime license key is normally generated automatically when SocketTools is installed with a valid serial number. It can also be generated using the License Manager utility installed with SocketTools.
  • When using C or C++, the cstools11.h header file should be included before Windows.h to ensure that the compiler does not try to include the deprecated Windows Sockets 1.1 header file. Failure to do so can result in compiler warnings about duplicated macros and function prototypes.
  • If you are using the Embarcadero C++ compiler, additional checks are imposed to ensure the SocketTools header files are included before WinInet.h and Vcl.h files. This prevents conflicts between our APIs and function prototypes defined in those header files.
  • The name for each of the DLLs and import libraries has been changed with the new version. Applications written using previous versions of SocketTools must be updated to use the new file names.
  • Some constant values have changed and added. This will not impact applications that used the defined macros, but may impact any application which uses hard-coded numeric values, rather than constants or macros.

Functions in earlier versions of SocketTools that accepted an IPv4 address as a 32-bit integer value have changed to use the new INTERNET_ADDRESS structure. If your application stores an IP address in a binary format, you will need to update that code. It is generally recommended that you store IP addresses in their string format, and you should allocate at least 40 characters for the string. That will be large enough to handle both IPv4 and IPv6 addresses.

Most of the networking APIs have an option to force the library to establish an IPv6 network connection. By default, the libraries will still give preference to using IPv4 for backwards compatibility. Note that using options which only establish connections using IPv6 may prevent applications from working correctly on older versions of Windows.

Applications which continue to use SocketTools 10 and earlier libraries can be installed side-by-side with the version 10 libraries. It is recommended that you redistribute the libraries in the same folder as your application executable, rather than a shared system folder such as C:\Windows\SysWOW64 or C:\Windows\System32. It is not recommended that you attempt to use different versions of the libraries within the same application.

Library File Names

The file names of the dynamic link libraries and import libraries have changed with the new version. The following table lists the new names. For more information, refer to the Redistribution section.

File Name Import Library Description
csdnsv11.dll csdnsv11.lib Domain Name Service Library
csftpv11.dll csftpv11.lib File Transfer Protocol Library
csftsv11.dll csftsv11.lib File Transfer Server Library
cshtpv11.dll cshtpv11.lib Hypertext Transfer Protocol Library
cshtsv11.dll cshtsv11.lib Hypertext Transfer Server Library
csicmv11.dll csicmv11.lib Internet Control Message Protocol Library
csmapv11.dll csmapv11.lib Internet Message Access Protocol Library
csmsgv11.dll csmsgv11.lib Mail Message Library
csmtpv11.dll csmtpv11.lib Simple Mail Transfer Protocol Library
csncdv11.dll csncdv11.lib File Encoding Library
csnvtv11.dll csnvtv11.lib Terminal Emulation Library
csnwsv11.dll csnwsv11.lib Network News Transfer Protocol Library
cspopv11.dll cspopv11.lib Post Office Protocol Library
csrshv11.dll csrshv11.lib Remote Command Protocol Library
csrssv11.dll csrssv11.lib Syndicated News Feed Library
cstimv11.dll cstimv11.lib Time Protocol Library
cstntv11.dll cstntv11.lib Telnet Protocol Library
cstshv11.dll cstshv11.lib Secure Shell Protocol Library
cstxtv11.dll cstxtv11.lib Text Messaging Library
cswebv11.dll cswebv11.lib Web Services Library
cswhov11.dll cswhov11.lib Whois Protocol Library
cswskv11.dll cswskv11.lib Windows Sockets (SocketWrench) Library