SocketTools Library Edition
Development Information
The SocketTools Library Edition provides an extensive API of over 800 functions that allows you to quickly integrate Internet functionality into your applications. It includes detailed technical documentation and examples, along with free technical support for developers and evaluators.
You can request an experienced software architect provide your company with a free quote and consultation for a project that uses SocketTools. This can include developing a specific desktop or server application, or a custom modification to a SocketTools component.
» Request a custom development quote online
Supported Languages
The SocketTools Library Edition libraries are native Windows dynamic link libraries (DLLs) that can be used with virtually any programming language. Included are standard C API prototypes, C++ classes, and function declarations for a variety of languages such as Visual Basic, Object Pascal (Delphi) and PowerBASIC.
The following code example shows how the SocketTools FTP API can be used to upload a file to a server using the SFTP (SSH) protocol:
// Connect to the file server and authenticate the user hClient = FtpConnect(lpszHostName, FTP_PORT_SSH, lpszUserName, lpszPassword, FTP_TIMEOUT, FTP_OPTION_DEFAULT, NULL); if (hClient != INVALID_CLIENT) { // Upload the local file to the server INT nResult = FtpPutFile(hClient, lpszLocalFile, lpszRemoteFile, FTP_TRANSFER_DEFAULT, 0L); if (nResult != FTP_ERROR) { _tprintf(_T("File %s uploaded successfully\n"), lpszLocalFile); } else { // Get the last error code in case of a failure DWORD dwError = FtpGetLastError(); _tprintf(_T("Error %08lX: File transfer failed\n"), dwError); } // Disconnect from the server when the transfer completes FtpDisconnect(hClient); return; } else { _tprintf(_T("Unable to connect to %s\n"), lpszHostName); return; }
CFtpClient ftpClient; // Connect to the file server and authenticate the user if (ftpClient.Connect(lpszHostName, FTP_PORT_SSH, lpszUserName, lpszPassword)) { // Upload the local file to the server INT nResult = ftpClient.PutFile(lpszLocalFile, lpszRemoteFile); if (nResult != FTP_ERROR) { _tprintf(_T("File %s uploaded successfully\n"), lpszLocalFile); } else { // Get the last error code in case of a failure DWORD dwError = ftpClient.GetLastError(); _tprintf(_T("Error %08lX: File transfer failed\n"), dwError); } // Disconnect from the server when the transfer completes ftpClient.Disconnect(); return; } else { _tprintf(_T("Unable to connect to %s\n"), lpszHostName); return; }
' Connect to the file server and authenticate the user hClient = FtpConnect(strHostName, _ FTP_PORT_SSH, _ strUserName, _ strPassword, _ FTP_TIMEOUT, _ FTP_OPTION_DEFAULT, _ 0) If hClient = INVALID_CLIENT Then MsgBox "Unable to connect to " + strHostName Exit Sub End If ' Upload the file to the server nResult = FtpPutFile(hClient, _ strLocalFile, _ strRemoteFile, _ FTP_TRANSFER_DEFAULT, _ 0) If nResult <> FTP_ERROR Then MsgBox "File transfer was successful" Else ' If the transfer failed, get the last error code nError = FtpGetLastError() MsgBox "File transfer failed, error " + Hex(nError) End If ' Disconnect from the server after the transfer completes FtpDisconnect hClient
// Connect to the file server and authenticate the user hClient := FtpConnect(PChar(sHostName), FTP_PORT_SSH, PChar(sUserName), PChar(sPassword), FTP_TIMEOUT, FTP_OPTION_DEFAULT, 0); if hClient = INVALID_CLIENT then begin Application.MessageBox('Unable to connect to file server', 'Error', MB_ICONEXCLAMATION); Exit; end; // Upload the local file to the server nResult := FtpPutFile(hClient, PChar(sLocalFile), PChar(sRemoteFile), FTP_TRANSFER_DEFAULT, 0); if nResult <> FTP_ERROR then Application.MessageBox('The file transfer was successful', 'Success', MB_ICONINFORMATION) else Application.MessageBox('The file transfer failed', 'Error', MB_ICONEXCLAMATION); // Disconnect from the server after the transfer completes FtpDisconnect(hClient);
SocketTools includes libraries for both 32-bit and 64-bit Windows, and provides a native API that is similar to the standard Windows API. C++ classes that provide an interface to the SocketTools APIs are included with SocketTools, however it is not required that you use C++. Function declarations are provided for a variety of other languages.
The SocketTools APIs use only common data types and simple structures that can be represented in most programming languages. If your favorite language can call functions exported from a DLL then it can use SocketTools. Note that the SocketTools libraries are not ActiveX DLLs and do not require COM registration.
Development Tools
Supported languages include Visual C++, C++ Builder, Delphi, PowerBASIC and most other Windows programming languages. Many free and open source compilers, such as Pelles C, Lazarus (Free Pascal) and MinGW can also be used with SocketTools. We also provide support for the free Visual Studio Community versions.
The SocketTools libraries can be used to create Windows desktop applications, including support for the MFC framework using C++. You can also use the libraries to create console-based programs and Windows services that run in the background. Projects can target both the x86 and x64 platforms, ensuring the broadest compatibility and native 64-bit Windows support.
Supported Platforms
On the desktop, SocketTools supports Windows 7 SP1 and later platforms, including the latest builds of Windows 11. On the Windows server platforms, SocketTools is supported on Windows Server 2008 R2 and later versions, including Windows Server 2022. Both 32-bit and 64-bit versions of Windows are supported.
Windows XP and Windows Vista are no longer supported platforms. SocketTools 11 uses APIs which require Windows 7 as a minimum. Due to a number of internal security-related changes, the libraries cannot be loaded on these older, unsupported versions of Windows.