FtpServer ActiveX Control  
 

Embed an FTP server in your application to exchange files with remote clients. The control handles standard FTP operations and provides events that let your application control how client requests are processed, with support for secure transfers using explicit TLS.

Reference

Control Information

Object Name FtpServerCtl.FtpServer
File Name CSFTSX12.OCX
Version 12.0.3041.1380
ProgID SocketTools.FtpServer.12
ClassID 6BF02DBD-9ED9-4DDC-8861-C5BBFD496270
Threading Model Apartment
Help File CST12CTL.CHM
Dependencies None
Standards RFC 959, RFC 1579, RFC 2228

Overview

The FtpServer ActiveX control enables applications to host an embedded FTP server that exchanges files with standard FTP clients, including applications developed with the SocketTools FtpClient control. The application specifies the server configuration and responds to events generated by client connections and commands. Default processing handles standard FTP operations, allowing applications to implement only the event handlers needed for their particular requirements.

For applications that need more control, command events provide access to the command name, parameters, target file, and result information. Handlers can filter commands, redirect file operations to a different local path, send customized responses, or implement additional commands. Individual commands can also be enabled or disabled. This provides flexibility to extend server behavior while retaining default processing for other operations.

Authentication and access control methods allow applications to validate clients, assign access rights, and manage virtual users. Applications can inspect the authenticated user, home directory, current working directory, and access permissions for a session. Path conversion functions translate between client-visible virtual paths and local file system paths, helping applications coordinate their own file handling with the server's directory structure. Virtual user records apply to the running server; applications that require persistent account storage manage that storage separately.

Server management methods allow the application to start, stop, restart, suspend, and resume the service. You can also enumerate active clients, inspect session addresses and identities, adjust idle timeouts, and disconnect individual clients. Throttling can be used to limit active connections, connections from a single address, and the rate of incoming connections. Transfer information and server memory usage properties provide additional visibility into activity and resource use.

This control uses an apartment threading model. Although the server creates worker threads internally to manage client sessions and network operations, events are not raised directly from those worker threads. Instead, the control marshals event notifications back to its hosting thread using the Windows message mechanism, so application event handlers execute in the context of the thread that created the control. This design simplifies event handling for applications that host the control, particularly those based on a single-threaded event model such as Visual Basic 6.0.

The control is best suited for applications serving a modest number of concurrent clients. Event processing depends on the hosting thread continuing to dispatch Windows messages, and lengthy processing within an event handler can delay the handling of events generated by other client sessions. Applications that require high levels of concurrency or perform significant processing in response to server events may be better served by a development environment that offers greater control over threading and asynchronous event processing.

The server supports active and passive file transfers, with configuration options for NAT routers and firewalls, including the address advertised for passive connections. Secure transfers use explicit TLS and require a valid security certificate installed on the system. Configurable server logs, command usage statistics, error information, and optional network tracing help applications monitor service activity and investigate problems.

Requirements

The SocketTools ActiveX Edition components are self-registering controls that are compatible with any programming language that supports the Component Object Model (COM) and the ActiveX control specification. If you are using Visual Basic 6.0, Service Pack 6 (SP6) is required. We recommend installing all available updates for your development tools. Although the Visual Basic 6.0 runtime is supported on Windows 11, the IDE itself is no longer officially supported by Microsoft. Legacy IDEs and compilers may also require elevated (administrator) privileges to run properly.

The ActiveX controls are supported on Windows 7, Windows Server 2008 R2, and later versions of both desktop and server editions of Windows. For Windows 7, Service Pack 1 (SP1) is the minimum requirement. For Windows 8 systems, the 8.1 update must be installed. On ARM-based platforms, the minimum supported version is Windows 10 build 1709.

SocketTools includes components for both 32-bit (x86) and 64-bit (x64) Windows platforms. All modern versions of Windows are 64-bit, but we continue to include 32-bit components for compatibility with legacy development tools such as Visual Basic 6.0. We also provide native ARM64 ActiveX controls for systems running Windows on ARM. Note that 32-bit applications on ARM run using x86 emulation, and Microsoft no longer supports native ARM32 applications.

If you are using VBScript, Visual Basic for Applications (VBA), or another scripting environment on an ARM-based system, be aware that 64-bit hosts will require ARM64 components, while 32-bit hosts will use x86 components under emulation. This includes applications created with Visual Basic 6.0. To reduce deployment complexity and avoid confusion, SocketTools does not include ARM32 ActiveX controls in its standard redistribution packages but they are available on request for legacy or specialized scenarios.

Distribution

When distributing an application which uses this control, you can either install the OCX file as a shared component in the appropriate system folder or in the same folder as your application executable. If the control is installed in a shared system location, the installer should manage it as a shared component to prevent other applications from being affected when it is updated or removed. If you install the control in the same folder as your executable, it is recommended that you use registration-free activation or COM redirection to ensure that the correct version of the control is loaded by the application.

This control has no external runtime dependencies beyond the standard Windows system libraries. It does not require the Microsoft Visual C++ Redistributable or any additional third-party libraries to be installed. All required components are either provided by Windows or statically linked into the ActiveX control, simplifying deployment and eliminating the need to distribute additional runtime files.