Dim xip As String = ""
Dim xport As String = ""
Dim s As String = FileSys.ReadAllText(".\ServerSetting.txt")
For Each x As String In s.Split(Chr(10))
If x.Split(":")(0) = "IP" Then
xip = x.Split(":")(1)
End If
If x.Split(":")(0) = "Port" Then
xport = x.Split(":")(1)
End If
Next
Output.Show(xip) ’显示结果是127.0.0.1
Output.Show(xport) ’显示结果是52177
QQClient.ServerIP = xip '指定服务器IP地址----如果直接写成“127.0.0.1“
QQClient.ServerPort = xport '指定服务器登录端口 -----如果直接写成“52177又可以执行
QQClient.UserName = "宋江"
QQClient.Password = "123"
If QQClient.Start() = True Then'如果登录成功
output.show("恭喜,OpenQQ登录成功!")
else
output.show("登录失败,原因:" & vbcrlf & QQClient.ServerMessage)
end if
运行时提示:
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2022.8.18.1
错误所在事件:启动IMClient
详细错误信息:
指定了无效的 IP 地址。
这是几个意思?