SocketTools includes example projects for each edition as part of the standard installation. They are copied into the Documents folder for the current user who installs SocketTools. This will always be where the examples are installed, regardless of the path provided for the SocketTools edition you are installing.
For most users, the path will typically look like this:
Inside that folder will be additional folders for the SocketTools edition and individual projects based on the IDE or language. The actual path may vary based on where each user’s Documents folder is located, and if OneDrive is being used.
The examples for the current version are also available for download from our file server. Each collection of examples are in a Zip archive, organized by edition.
- SocketTools .NET Edition Examples
- SocketTools ActiveX Edition Examples
- SocketTools Library Edition Examples
You can copy the collection of examples to any folder, but make sure you preserve the folder structure.
The .NET examples will use the default path for the references to the SocketTools assemblies, which are installed under C:\Program Files (x86)\Common Files\SocketTools
The assemblies are organized by SocketTools version and .NET Framework. If you want to use a specific .NET Framework version with the example, you can change the reference in the project.
There are examples included for both C# and Visual Basic, and they are functionally identical aside from the specific language being used. Most of them are Windows Forms based projects, however SocketTools is not limited to those types of projects.
Most SocketTools .NET components have no user interface and can be used with any project type, however the SocketTools.Terminal component is derived from Windows.Forms.UserControl and requires a form.
The examples for the ActiveX Edition are primarily for Visual Basic 6.0, although there are several general VBScript examples included. Make sure you have Visual Studio 6.0 Service Pack 6a (SP6a) installed.
While the Visual Basic 6.0 runtime is supported on Windows 10, the IDE is no longer supported by Microsoft. You can install the IDE on Windows 10, but you need to make sure you start with Administrative privileges.
You may need to run the Program Compatibility Troubleshooter if Visual Basic 6.0 isn’t working correctly on your system. Search for “compatibility” in Windows Settings.
Most Windows development systems today are 64-bit, so it is important to remember the ActiveX controls used by Visual Basic 6.0 are 32-bit and both the IDE and applications run under WoW64 (the 32-bit environment for 64-bit Windows). This means the controls you are using are in C:\Windows\SysWOW64. You should not reference the controls in C:\Windows\System32 because those are for 64-bit applications.
The examples for the Library Edition are primarily for C/C++, with additional examples for Visual Basic and PowerBASIC included. Although we do provide examples for Visual C++ 6.0, it will require you to have Visual Studio 6.0 Service Pack 6a (SP6a) installed and Microsoft Platform SDK February 2003.
The Visual Studio projects are configured to use an environment variable to determine where the SocketTools C/C++ header files and import libraries can be found. This environment variable is based on the version, and created when SocketTools is installed. For example, the SocketTools10 variable would be set to the installation folder for the SocketTools 10 Library Edition.
If you copy these projects to a system where the SocketTools installer was not used, compilation will fail because this environment variable has not been set. You can either manually create this environment variable yourself (in Windows Settings, search for “environment”) or you can update the project to use a fixed path to the include files and import libraries.