我已经知道连接到Rumba 3270主机我需要合并
"Ehlapi32.DLL
“
然而,当我在谷歌上搜索时,我发现了很多功能,我不知道如何使用。我有以下代码连接,但它返回连接错误。
Sub fConnect()
nRT = 0
Call hllapi(1, ByVal "A", 0, nRT)
If nRT <> 0 Then 'if not made connection display a Error
MsgBox "Connection Error. Try again"
Else
strConectado = True
End If
End Sub
以下是hllapi功能
Declare Function hllapi Lib "C:\Program Files\NetManage\System\Ehlapi32.DLL" (Func As Integer, ByVal lpszData As String, Length As Integer, Value As Integer) As Integer
Declare Function OSGetPrivateProfileString% Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal ReturnString$, ByVal NumBytes As Integer, ByVal FileName$)
' HLLAPI FUNCTION DECLARATIONS
Public nRT
Public strConectado As Boolean
Public Enum ImpulseKeyEnum
ike_enter = 0
ike_f1 = 1
ike_F2 = 2
IKE_F3 = 3
ike_F4 = 4
ike_F5 = 5
ike_F6 = 6
ike_F7 = 7
ike_F8 = 8
ike_F9 = 9
ike_F10 = 10
ike_F11 = 11
ike_F12 = 12
ike_F13 = 13
ike_BackTab = 93
ike_Left = 94
ike_right = 95
ike_UP = 96
ike_Down = 97
ike_Tab = 98
ike_clearfield = 99
ike_Attention = 100
End Enum
Public Enum PositionSearch
ika_right = 1
ika_Left = 2
End Enum
当我使用F8键打开RUMBA运行程序时,显示错误,“nRT”变量设置为“1”而不是“0”。
答案 0 :(得分:0)
您是否将连接的名称指定为“ A”。除非不是“ A”,否则它将给出错误。
首先将会话简称命名为“ A”。然后再次运行。