Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Image Removed

       




QWS3270 COM .NET Help
Application..::.StartSession Method
Application Class  Example  See Also  Send Feedback



Starts the specified program and attempts to open a connection to the specified session. The session must have been previously created in the corresponding program, and a HLLAPI session ID must have been set for that session.

Namespace:  JollyGiant.Emulation
Assembly:  JGSComdotNet (in JGSComdotNet.dll) Version: 1.0.0.0 (1.0.0.0)

Image RemovedSyntax


C#
public StatusCode StartSession(
	string qwsPath,
	string sessionName
)
Visual Basic (Declaration)
Public Function StartSession ( _
	qwsPath As String, _
	sessionName As String _
) As StatusCode
Visual C++
public:
virtual StatusCode StartSession(
	String^ qwsPath, 
	String^ sessionName
) sealed
JavaScript
function StartSession(qwsPath, sessionName);


Parameters

qwsPath Type: System..::.StringFull name and path of the QWS program executable, for example "C:\Program Files\QWS3270 PLUS\qws3270p.exe"

sessionName Type: System..::.StringThe name of the session to connect to.

Return Value

The StatusCode indicating the result of the operation.

This can be one of the following values:


Status codeDescription
OkThe new process was successfully started with the specified session. Note that this does not guarantee that the session exists, or that the connection to the remote host was made.
WHLLSTARTPROCFAILEDThe process could not be started.
WHLLUNKNOWNAn unknown error occurred.


Implements

IApplication..::.StartSession(String, String)

Image RemovedExamples

Starts a new QWS3270 PLUS instance and tries to connect to "WorkSession".
CopyC#
void reportError(JollyGiant.Emulation.StatusCode code)
{
    Console.WriteLine(JollyGiant.Emulation.Utility.errorToString(code));
}
QWS3270 qws = new QWS3270();

string path = @"C:\Program Files\QWS3270 PLUS\qws3270p.exe";
string session = "WorkSession";
JollyGiant.Emulation.StatusCode code =
    qws.Application.StartSession(path, session);

if (code == StatusCode.Ok)
    reportError(code);

Image RemovedExceptions


ExceptionCondition
System..::.ArgumentExceptionOne of the supplied arguments was null or an empty string.
System.IO..::.FileNotFoundExceptionThe path to the executable passed to the method was invalid.


Image RemovedSee Also


Send comments on this topic to Jolly Giant Software

Copyright 2009 by Jolly Giant Software, Inc.