APIEnabled

此项会指示仿真器是否已启用 API。连接可能已启用或已禁用 API,具体取决于其 API 设置的状态(在 Z and I Emulator for Windows 窗口中,选择文件 → API 设置)。如果仿真器已启用,则值为 True;否则为 False。APIEnabled 是布尔数据类型且为只读。下列示例展示了此属性。

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