Sample C++ and Visual Basic Project Files

Top  Previous  Next

 

Two fully functional sample programs are provided with FileLink -- 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 and C#) are possible as long as the languages support the COM/OLE interface.

 

These programs demonstrate how script commands are sent to FileLink 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 FileLink. Each program allows you to enter script commands from the keyboard and have them executed by FileLink. The results of each command are returned and displayed. Assuming that you do no elect to hide FileLink, you can watch commands in the FileLink window .

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

 

filelink_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.

 

Note

 

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