如何解决重新编写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 举报,一经查实,本站将立刻删除。