Sample C++ and Visual Basic Project Files

Top  Previous  Next

 

Two fully functional sample programs are provided with Robo-FTP -- one written in Visual C++ and the other in Visual Basic. All source code and project files are included. Controlling applications written in other languages (e.g. VBScript, Delphi) are possible as long as the languages support the COM/OLE interface.

 

These programs demonstrate how script commands are sent to Robo-FTP and how result codes are returned, and may be used as a guide for the creation of your own application. By studying the source code for these sample programs, you can learn how to write your application.

 

The sample programs can be used to exercise limited interactive control over Robo-FTP. Each program allows you to enter script commands from the keyboard and have them executed by Robo-FTP. The results of each command are returned and displayed. Assuming that you do no elect to hide Robo-FTP, you can watch commands in the Robo-FTP window.

When you run the C++ sample, you'll see something resembles that the following image. The C++ and VB programs are functionally equivalent, so the VB sample is virtually identical.

 

robo_client_screen

 

Caution

These sample programs are not intended for production use and you may experience difficulties if you attempt to use then in such a manner.

 

Important

The time-out parameter specified on a blocking send command call must be long enough for Robo-FTP to complete the requested command. For example, if you ask Robo-FTP to send a large file and the time-out is too short, the sample program will time out before Robo-FTP actually completes the transfer. You may set the time-out to zero to prevent the sample program from timing out.

 

 

See also: COM/OLE Operational Overview, COM Programming Reference