重新编写getTickCount以与Private Delare PtrSafe Sub Sleep Lib“ kernel32”一起使用ByVal dwMilliseconds只要很长

问题描述

希望您能提供帮助,我已移至Windows 10计算机64位,并且我用来与Attachmate进行交互的代码之一不再起作用,因为它现在是反射Attachmate

原始代码是

Private Declare Function GetTickCount Lib "kernel32" () As Long

Function screenCheckOK() As Boolean
    ' will wait for screen to become free. if not free after
    ' 30 seconds will return false

    Dim screenStatus As Integer
    Dim Start As Long
       
    screenCheckOK = False
    Start = GetTickCount()
    Do
        If GetTickCount() >= Start + 30000 Then Exit Function
        DoEvents
        screenStatus = getScreenStatus
    Loop Until screenStatus = 0
    screenCheckOK = True
End Function

很明显我不能使用GetTickCount,现在必须使用 Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

但是我似乎无法为其编写新代码。我以为我可以使用'Sleep200,但这不起作用。
有什么帮助吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...