Creating an OLE Script
You can code OLE Automation containers to implement all of 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 Basic and Visual C++.
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”)
- 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 FtpSession1 As Object
-
- Set FtpSession1 = FtpSessions.NewSession
-
- FtpSession1.ServerName=”ftp.com”
-
- FtpSession1.UserLogin