RoboStartSessionMethod to initiate a Robo-FTP session

<< Click to Display Table of Contents >>

Navigation:  Robo-FTP User's Guide > Using Robo-FTP > Using COM/OLE to Control Robo-FTP > COM Methods >

RoboStartSessionMethod to initiate a Robo-FTP session

 

Overview

Method to initiate a named session between Robo-FTP and a user-written application.

 

C++ Definition

long RoboStartSession( CString strSessionName, BOOL bBlocking, BOOL bHidden, CString strCmdLineArgs )

 

VB Definition

RoboStartSession( SessionName As String, Blocking As Long, Hidden As Long, Args As String ) As Long

 

C# Definition

Int RoboStartSession( String strSessionName, Int bBlocking, Int bHidden, String strCmdLineArgs )

 

VB.NET Definition

RoboStartSession( SessionName As String, Blocking As Integer, Hidden As Integer, Args As String ) As Integer

 

Return Value

The numeric result code returned to indicate the success or failure in initiating a named session with Robo-FTP.

 

Returns ROBO_ERROR_SUCCESS if a named session is successfully started.

Returns ROBO_ERROR_SESSION_EXISTS if a session with the same name already exists.

(Because Robo-FTP no longer requires a unique session name, this return code is deprecated.)

Returns ROBO_ERROR_CANNOT_CREATE if a session with Robo-FTP cannot be created.

 

See COM/OLE Return Codes below for a complete list of possible return values.

 

Parameters

strSessionName / SessionName

This parameter is required but its purpose is deprecated so it is safe to use a zero-length string.

 

bBlocking / Blocking

A boolean that when TRUE results in the synchronous execution of subsequent RoboSendCommand() method calls made during the session. This means execution of your program will be blocked until either Robo-FTP completes execution of the command or the RoboSendCommand timeout period elapses. If FALSE, each subsequent RoboSendCommand is non-blocking so your program will not wait for Robo-FTP to complete the command; it will resume executing immediately. If your programming environment supports events you may use RoboCommandProgress and RoboCommandResult to monitor the asynchronous progress of non-blocking commands.

 

bHidden / Hidden

A boolean that when TRUE results in Robo-FTP being loaded and run invisibly. If FALSE, the Robo-FTP window appears as it would normally.

 

strCmdLineArgs/ Args

A string defining optional command line arguments to pass Robo-FTP when it is launched.

 

Remarks

This method returns when Robo-FTP has been launched and the session name is established.