APIEnabled

This indicates whether the emulator is API-enabled. A connection may be enabled or disabled depending on the state of its API settings (in a Z and I Emulator for Windows window, choose File -> API Settings). The value is True if the emulator is enabled; otherwise, it is False. APIEnabled is a Boolean data type and is read-only. The following example shows this property.

DIM  Hand as Long
DIM  SessObj as Object
 
Set SessObj = CreateObject("ZIEWin.autECLSession")
 
' Initialize the session
SessObj.SetConnectionByName("A")
 
' This code segment checks to see if A is API enabled.
' The results are sent to a text box called Result.
If SessObj.APIEnabled = False Then
  Result.Text = "No"
Else
  Result.Text = "Yes"
End If