| SocketTools 7.2 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 PlatformsSocketTools 7.2 is supported on Windows XP, Windows Server 2003, Windows Vista, Windows 7 and Windows Server 2008. There have been a significant number of internal changes in the core networking code used by the SocketTools libraries which take advantage of features that are specific to those platforms. Earlier versions of the operating system, including Windows 95, Windows 98, Windows Me, Windows NT 4.0 and Windows 2000 are no longer supported by Microsoft and are not compatible with SocketTools. Windows 7 and Windows Server 2008The SocketTools 7.2 Library Edition has been specifically designed for full compatibility with the Windows 7 and Windows Server 2008 operating systems. Developers who are redistributing applications which target these platforms should upgrade to the current version of SocketTools to ensure compatibility. It is strongly recommended that you review the Windows 7 section of the Microsoft website and familiarize yourself with the changes in the operating system and specifically how the User Account Control (UAC) system works. Development ToolsAs standard Windows dynamic link libraries, the SocketTools 7.2 libraries may be used with virtually any programming language that 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++ compiler in OMF format. Other languages should use the convention appropriate for calling an exported function, such as the Declare statement in Visual Basic. Note that while the libraries may be used with the .NET languages, it is recommended that you use the SocketTools .NET Edition if you are creating applications for the .NET Framework. If you are developing on the Windows Vista or Windows 7 platforms, Microsoft only supports Visual Studio 2005 and later versions. Earlier versions of Visual Studio are unsupported and may require that you use those development tools with elevated privileges. If you are using Visual Studio 6.0 or Visual Studio .NET 2003 and cannot upgrade to the current version of Visual Studio, Microsoft recommends that you continue to develop on the Windows XP platform. Applications built on Windows XP can be installed on Windows Vista, and Vista fully supports both the Visual Basic 6.0 runtime and .NET 1.1 Framework. It is recommended that you download the current service packs available for Visual Studio .NET 2003 and Visual Studio 2005 from Microsoft. Additionally, if you are using Visual Studio 2005 it is recommended that you download the current Windows SDK which targets the Windows Vista, Windows 7 and Windows Server 2008 platforms. SocketTools Header FilesIn earlier versions of SocketTools, there were a number of different header files which were included by cstools.h. For example, there were different header files for constants, function prototypes and so on. In SocketTools 5.0 and earlier versions, the function prototypes and C++ class definitions were in separate include files. With SocketTools 7.2, all of the library constants, functions and C++ classes are in a single header file named cstools7.h. The error codes are defined in a separate header file named cserror7.h, which is automatically included by cstools7.h. There are three special macros which C++ developers can use to control certain behavior:
SocketTools C++ Class WrappersThe C++ class wrappers for the SocketTools libraries have been moved from a separate file into the cstools7.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). 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 From Version 6.0If you are upgrading from SocketTools 6.0 most applications will be source-compatible with version 7.1 and will not require significant changes to your existing code. The only requirement is to include the new header files and link to the new version of the import libraries. Note that the library file names have changed, as have the export function ordinals. This means that the new libraries are not binary compatible and are not drop-in replacements for the version 6.0 libraries. If you have declared functions by ordinal in your application (something that is not commonly 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 values. For developers who are using the SocketWrench API or the Domain Name Service API, you may need to make some additional changes to your source code. Because SocketTools 7.2 supports both IPv4 and IPv6 network connections, some functions had to be modified to support the different types of addresses. In particular, those functions which used a 32-bit unsigned integer (DWORD) to store an IP address were changed to use an INTERNET_ADDRESS structure which can accommodate both types of addresses. The following lists the changes that developers should be aware of when migrating from earlier versions:
Applications which continue to use the SocketTools 6.0 libraries can be installed side-by-side with the version 7.1 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\System32. While it would be possible to use 6.0 libraries and earlier versions in the same application, they would have to be loaded dynamically because the function names used in the two versions are the same. The runtime license key has also changed for Version 7.2, which will require you to define the new key in your application when calling the library's initialization function. As with previous versions of SocketTools, you can use the License Manager utility to generate a new header file which contains the runtime key you should use. The version 6.0 runtime key is not valid for the Version 7.2 libraries and an error will be returned if an invalid runtime key is specified. Library File NamesThe file names of the dynamic link libraries and import libraries have changed with the new version. The following table lists the new names.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Copyright © 2012 Catalyst Development Corporation. All rights reserved. |