Top  Previous  Next


The QMConnectLocal() function attempts to establish a QMClient process on the local system. The process runs as the user executing the function. If successful, the function returns True. If unsuccessful, the function returns False and the QMError() function can be used to retrieve a text error message identifying the cause of the failure.


A single client may open multiple connections simultaneously. For the C and VB.Net variants of QMClient, the internal session number associated with the session opened by QMConnectLocal() can be retrieved using QMGetSession(). All subsequent QMClient function calls relate to the most recently opened session unless QMSetSession() is used to select an alternative session. For the QMBasic class module, Java and Python variants of QMClient, each session is instantiated as a separate object.


QMClient sessions run the LOGIN paragraph (if present) but not the MASTER.LOGIN paragraph. A QMClient session can be recognised within this paragraph by testing the value of @TTY which will be "vbsrvr" for QMClient. Note that a prompt for input within the actions performed by the LOGIN paragraph cannot be handled via QMClient.


Use of QMConnectLocal() needs to know the location of the QMSYS directory. If this is not in its default location (C:\QMSYS on Windows, /usr/qmsys on other platforms), the QMSYS environment variable must be set to specify the location.







hmtoggle_plus1QMBasic Class Module







See also:

QMConnect(), QMDisconnect