Creating an OLE Script
You can code OLE Automation containers to implement all the features and functions of FTP in another application that uses OLE features, such as Hummingbird Basic. You can work with FTP session objects to call functions, such as connecting to a host, transferring files from host to host, and so on. You can use any tool that supports OLE Automation control, such as Visual C++ and Visual Basic.
To create an OLE script:
- Create the main FTP Engine Object. All objects support a dual interface. This lets you fully use the FTP OLE features. For example:
-
-
Dim FtpEngine As Object
Set FtpEngine = CreateObject("HclFtp.Engine")
-
Dim FtpEngine As Object
- Retrieve an FTP Sessions collection. This lets you set such things as local drives, access permissions, and so on. For example:
-
-
Dim FtpSessions As Object
Set FtpSessions = FtpEngine.Sessions
-
Dim FtpSessions As Object
-
-
Dim FtpSession1 As Object
Set FtpSession1 = FtpSessions.NewSession
-
Dim FtpSession1 As Object
-
- FtpSession1.ServerName=ftp.com
-
- FtpSession1.UserLogin