SocketTools ActiveX Edition
Development Information
The SocketTools ActiveX controls allow you to quickly integrate Internet functionality into your applications with an easy to use interface and minimal coding. The ActiveX edition 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 ActiveX controls are lightweight ATL-based controls that can be used with Visual Basic 6.0 and Microsoft Office (VBA), as well as a variety of other languages such as PowerBuilder and Visual FoxPro. SocketTools can also be used with scripting languages that support COM components, such as VBScript.
The following code example shows how the FtpClient control could be used to upload a file to a server using the SFTP (SSH) protocol:
FtpClient1.HostName = editHostName.Text FtpClient1.RemotePort = ftpPortSSH FtpClient1.UserName = editUserName.Text FtpClient1.Password = editPassword.Text ' Connect to the server and authenticate the user nError = FtpClient1.Connect() If nError > 0 Then MsgBox FtpClient1.LastErrorString, vbExclamation Exit Sub End If ' Upload the local file to the server nError = FtpClient1.PutFile(editLocalFile.Text, editRemoteFile.Text) If nError > 0 Then FtpClient1.Disconnect MsgBox FtpClient1.LastErrorString, vbExclamation Exit Sub End If ' Disconnect from the server after the transfer completes FtpClient1.Disconnect MsgBox ("The file was uploaded successfully")
' Create an instance of the ActiveX control Dim oFtpClient Set oFtpClient = WScript.CreateObject("SocketTools.FtpClient.11") ' Initialize the control to prepare it for use nError = oFtpClient.Initialize() If nError > 0 Then WScript.Echo "Unable to initialize SocketTools control" WScript.Quit(1) End If ' Connect to the server and authenticate the user nError = oFtpClient.Connect(sHostName, 22, sUserName, sPassword) If nError > 0 Then WScript.StdErr.WriteLine oFtpClient.LastErrorString WScript.Quit(1) End If ' Upload the local file to the server nError = oFtpClient.PutFile(sLocalFile, sRemoteFile) If nError = 0 Then WScript.StdOut.WriteLine "Uploaded " & sLocalFile Else WScript.StdErr.WriteLine oFtpClient.LastErrorString WScript.Quit(1) End If ' Disconnect from the server after the transfer completes oFtpClient.Disconnect WScript.Quit(0)
// Declare the variant parameters passed to the control _variant_t varHostName = m_strHostName; _variant_t varHostPort = m_nHostPort; _variant_t varUserName = m_strUserName; _variant_t varPassword = m_strPassword; _variant_t varError; // Connect to the server and authenticate the user varError = m_pFtpClient->Connect(varHostName, varHostPort, varUserName, varPassword); if ((int)varError > 0) { CString strError = m_pFtpClient->GetLastErrorString(); AfxMessageBox(strError, MB_ICONEXCLAMATION); return; } _variant_t varLocalFile = m_strLocalFile; _variant_t varRemoteFile = m_strRemoteFile; // Upload the local file to the server varError = m_pFtpClient->PutFile(varLocalFile, varRemoteFile); if ((int)varError > 0) { CString strError = m_pFtpClient->GetLastErrorString(); m_pFtpClient->Disconnect(); AfxMessageBox(strError, MB_ICONEXCLAMATION); return; } // Disconnect from the server after the transfer completes m_pFtpClient->Disconnect(); AfxMessageBox(_T("The file was uploaded successfully"), MB_ICONINFORMATION);
The SocketTools ActiveX controls can be used with any development tools which supports the ActiveX component model. They can also be used as components with scripting languages that support COM objects. If you are using C# or VB.NET, it is recommended you use the SocketTools .NET Edition to avoid the additional overhead imposed by referencing ActiveX controls.
Development Tools
Supported development tools are Visual Basic 6.0, Visual Basic for Applications (VBA) and all current versions of Visual Studio. Other third-party IDEs and languages, such as Visual FoxPro and PowerBuilder can also be used. If your favorite language can use ActiveX controls or standard COM objects, it can also use the SocketTools ActiveX Edition controls.
The SocketTools ActiveX Edition includes both 32-bit and 64-bit controls for the broadest compatibility with all platforms. They can be used with legacy development environments such as Visual Basic 6.0, as well as the 64-bit version of Microsoft Office and other languages that target the x64 Windows platform.
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 ActiveX controls cannot be loaded on these older, unsupported versions of Windows.