我希望你能提供帮助,我已经转移到一台 64 位的 Windows 10 机器上,我用来与 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,但这不起作用。
请问有什么帮助吗?