When you create an application using the SocketTools 12 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.
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 versions of Windows, as well as Windows on Arm through emulation. An application built to target the x64 platform (64-bit) will only run on 64-bit versions of Windows, including Windows on Arm through emulation.
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. An application built to target the ARM64 platform will only run on Windows on Arm systems and uses the native ARM64 architecture.
- x86 projects will run on 32-bit and 64-bit Windows and Arm through emulation.
- x64 projects will run on 64-bit Windows and on Arm through emulation.
- ARM64 projects will only run on Arm and is not supported on Intel or AMD-based platforms.
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.
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 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 12.0 Library Edition\Redist\x86Â Â (Windows 32-bit)
C:\Program Files (x86)\SocketTools 12.0 Library Edition\Redist\x64Â Â (Windows 64-bit)
C:\Program Files (x86)\SocketTools 12.0 Library Edition\Redist\arm64Â Â (Windows on Arm 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:
 cstools12_library_x86.msi (32-bit)
 cstools12_library_x64.msi (64-bit)
 cstools12_library_arm64.msi (ARM64)
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.
Although Windows on Arm provides excellent compatibility through x86 and x64 emulation, native ARM64 applications avoid the overhead associated with emulation and can take full advantage of the underlying hardware. This can result in improved performance, lower power consumption and better overall responsiveness. For applications that are intended to support Windows on Arm systems, building a native ARM64 version and redistributing the ARM64 SocketTools components is recommended
If your application depends on third-party components that are only available for x86 or x64, you may need to redistribute the corresponding x86 or x64 interop library and run your application under emulation rather than as a native ARM64 application.
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 cstools12_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
Managing the Library Edition License Key
SocketTools Installer Packages
Creating a Runtime License Key
SocketTools 12 .NET Redistribution
SocketTools 12 ActiveX Redistribution
