调用“winmm.dll” timsSetevent和timeKillEvent 读随机文件,在vb内运行正常生产exe后报错!急!必有重谢!!!
Option Explicit
Public Declare Function timeSetEvent Lib "winmm.dll" (ByVal uDelay As Long, ByVal uResolution As Long, ByVal lpFunction As Long, ByVal dwUser As Long, ByVal uFlags As Long) As Long
Public Declare Function timeKillEvent Lib "winmm.dll" (ByVal uID As Long) As Long
Public Const TIME_PERIODIC = 1
Public MyID As Long
Public cTimeEvent As Long
Public fid As Integer
Public Function TimeProc(ByVal nTimeID As Long, ByVal lMsg As Long, ByVal dwUser As Long, ByVal dwR1 As Long, ByVal dwR2 As Long) As Long
If nTimeID = MyID And Not (EOF(fid)) Then
Get #fid, cTimeEvent, fdata
Call zhuanhuan
Call io
cTimeEvent = cTimeEvent + 1
End If
If EOF(fid) Then
tingzhin = 0
Form1.tingzhi.Enabled = True
timeKillEvent MyID
End If
End Function
运行环境为xp vb6