Start Method (String, String, Char, Int32)
Namespace: Â JollyGiant.Emulation
Assembly: Â JGSComdotNet (in JGSComdotNet.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
[ComVisibleAttribute(false)] public StatusCode Start( string qwsPath, string hostname, ref char sessionID, int port ) |
Visual Basic (Declaration) |
---|
<ComVisibleAttribute(False)> _ Public Function Start ( _ qwsPath As String, _ hostname As String, _ ByRef sessionID As Char, _ port As Integer _ ) As StatusCode |
Visual C++ |
---|
[ComVisibleAttribute(false)] public: virtual StatusCode Start( String^ qwsPath, String^ hostname, wchar_t% sessionID, int port ) sealed |
JavaScript |
---|
function Start(qwsPath, hostname, sessionID, port); |
Parameters
qwsPath
Type: System..String
The fully qualified path to the QWS program to use.
hostname
Type: System..String
Host name or IP address of the host you want to connect to.
sessionID
Type: System..Char
The session ID to use. The specified ID is only a request to the program. If the requested ID is already in use by another program instance, the last unused ID (Z-A) will be selected and returned in this parameter.
You will need this ID to establish a logical connection to the session before you can exchange information with it.
port
Type: System..Int32
The port number the host is listening on for incoming connections.
Return Value
The StatusCode indicating the result of the operation.This can be one of the following values:
Status code | Description |
---|---|
Ok | The new program instance was started successfully. |
InvalidPsId | The requested session ID was not a valid (A-Z,a-z) character. |
WHLLTOOMANYSESSIONS | All 26 session IDs are already in use. |
WHLLSTARTPROCFAILED | Unable to start the new process. |
WHLLUNKNOWN | An unknown error occurred. |
Implements
IApplication...Start(String, String, Char, Int32)Examples
string qwsPath = @"C:\Program Files\QWS3270 PLUS\qws3270p.exe"; string hostName = @"jollygiant.dnsalias.com"; char id = 'A'; int port = 1023; StatusCode sc = qws.Start(qwsPath, hostName, ref id, port);
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentException | Program path or host name are null or empty strings. |
System.IO..::.FileNotFoundException | The file specified in qwsPath could not be found. |