Versions Compared

Key

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

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#
StatusCode StartSession(
	string qwsPath,
	string sessionName
)


Visual Basic (Declaration)
Function StartSession ( _
	qwsPath As String, _
	sessionName As String _
) As StatusCode


Visual C++
StatusCode StartSession(
	String^ qwsPath, 
	String^ sessionName
)


JavaScript
function StartSession(qwsPath, sessionName);


Parameters

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

sessionName
Type: System..::.StringThe String
The 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.


Image RemovedExamples

Starts a new QWS3270 PLUS instance and tries to connect to "WorkSession".
Image RemovedCopyC#
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.