ISession_Connect Method
Attempts to connect to the session specified in the object.
Namespace: Â JollyGiant.Emulation
Assembly: Â JGSComdotNet (in JGSComdotNet.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
StatusCode Connect( Object sessionId ) |
Visual Basic (Declaration) |
---|
Function Connect ( _ sessionId As Object _ ) As StatusCode |
Visual C++ |
---|
StatusCode Connect( Object^ sessionId ) |
JavaScript |
---|
function Connect(sessionId); |
Parameters
sessionId
Type: System..Object
The single character ID of the session to connect to.
Return Value
Returns the StatusCode of the connection attempt. The returned value can be one of the following:
Status code | Description |
---|---|
WHLLOK | Connect request successful, and the specified session is unlocked and ready for input. |
WHLLNOTCONNECTED | Connect request failed, specified session ID is invalid. |
WHLLPSBUSY | Connect request successful, but the specified session is busy. |
WHLLINHIBITED | Connect request successful, but the specified session is locked (input inhibited). |
WHLLSYSERROR | Connect request failed due to a system error. |
WHLLUNAVAILABLE | Connect request failed, specified session is unavailable (already in use). |
Remarks
In order to communicate with an instance of QWS, you will need to specify which session you want to exchange information with. Some methods take a session identifier to specify the instance. Others require that your application is already connected to an instance, and will use that connected instance. The Connect method allows you to connect your application to a QWS session.
Connect will accept objects of type String, Int32, UInt32, Int16, Int32, UInt16, UInt32 and Char
Examples
C#
Connect("A"); // or Connect('a'); // or Connect(65); // or byte iid = 65; Connect(iid);
See Also
ISession Interface
JollyGiant.Emulation Namespace
ISession..::.Disconnect()
Send comments on this topic to Jolly Giant Software
Copyright 2009 by Jolly Giant Software, Inc.