When you create an application using the SocketTools 10 Library Edition DLLs and you're ready to deploy it, you must ensure the libraries you're using are initialized correctly. This is done by providing a runtime license key to the initialization function for each of the SocketTools APIs you are using. It is important to note your runtime license key is not your product serial number.
If you have an evaluation version of SocketTools, you will not be able to redistribute your application until you have a runtime license key. During the evaluation period, your software will only work on the development system where SocketTools has been installed. After you've purchased a development license, you'll be able to create a runtime license key and redistribute your application.
Important: This article provides information for a version of SocketTools which is no longer supported. It is recommended you upgrade your project to use the current version.
Library Initialization
Before you call any other functions in the library, call the initialization function and pass the runtime license key string as the first argument. The second argument is a pointer to a structure, and if that information is not required, you can simply provide a NULL pointer.
Each SocketTools API has its own initialization function. For example, if you are using the FTP API, call the FtpInitialize function. If you are using the HTTP API, call the HttpInitialize function. You should always check the return value from the initialization function to ensure the library has initialized correctly.
You can generate the runtime license key using the License Manager utility included with the software. Select License | License Key from the menu to display the runtime license key, or use License | Header File from the menu and then choose your language from the dropdown list to generate a file which contains the key.
Additional information about licensing can be found in the documentation, including the Licensing Information section, Initialization in the Developer's Guide and the specific initialization functions in the Technical Reference.
Redistribution
When redistributing your application to another system, you have two options. One is to include the SocketTools DLLs in the same folder as your application executable. The other is to install them into the Windows system folder. Because the libraries come in both 32-bit and 64-bit versions, it's important you redistribute the correct version to match the application's target platform.
When considering your application's target platform, it refers to the CPU architecture selected when compiling the application. An application built to target the x86 platform (32-bit) will run on both 32-bit and 64-bit Windows. An application built to target the x64 (64-bit) platform will only run on 64-bit Windows.
If your application is 32-bit, you can only use the 32-bit SocketTools libraries, regardless if your application is being installed on a 32-bit or 64-bit version of Windows. If your application is 64-bit, then you can only install it on 64-bit versions of Windows and can only use the 64-bit libraries.
If you are deploying your application to a system running the 64-bit version of Windows and installing the libraries into the Windows system folder, you should install the 32-bit libraries in the \Windows\Syswow64 folder, and the 64-bit libraries in the \Windows\System32 folder.
If you are using the logging functions in your application, such as FtpEnableTrace, you should also include the cstrcv10.dll library with your installation package and install it in the same folder as the other SocketTools libraries your application is using.
Your installation software should always perform version checking to ensure it's not overwriting a newer version of a library with an older version. If the software you're using (e.g.: InstallShield) creates a 32-bit executable and you're deploying a 64-bit application, the installer must be capable of detecting it's running on a 64-bit system and can disable filesystem redirection to ensure the 64-bit libraries are installed in the correct location. Consult the documentation for your installation software to determine if it's 64-bit compatible.
Redistributable versions of the SocketTools libraries can be found in:
C:\Program Files (x86)\SocketTools 10.0 Library Edition\Redist\x86Â Â (32-bit)
C:\Program Files (x86)\SocketTools 10.0 Library Edition\Redist\x64Â Â (64-bit)
If you installed SocketTools on 32-bit Windows, the default installation will be in C:\Program Files instead of C:\Program Files (x86). If you changed the default installation path, then the Redist folder will be found where you installed SocketTools.
Installer Packages
To help simplify deployment, we've created MSI (Windows Installer) packages you can use to install the SocketTools libraries on end-user systems:
 cstools10_library_x86.msi (32-bit)
 cstools10_library_x64.msi (64-bit)
If you’re redistributing a 32-bit application, then all you need is the x86 installer package. If you’re redistributing a 64-bit application, then you need the x64 installer package. The installer packages will make sure the SocketTools libraries are installed in the correct location and will perform the appropriate version checking.
If you have your own installer for your software, then you can redistribute those MSI packages with your installation and use the msiexec command to perform the installation. For example, this would install the 32-bit libraries with no UI displayed:
msiexec /i cstools10_library_x86.msi /qn
For the complete list of command line options for msiexec, refer to
https://docs.microsoft.com/en-us/windows/desktop/Msi/command-line-options
See Also
SocketTools Installer Packages
Creating a Runtime License Key
SocketTools 10 .NET Redistribution
SocketTools 10 ActiveX Redistribution