WinIo.Bas
上传用户:gztxhy
上传日期:2020-04-03
资源大小:82k
文件大小:1k
- Attribute VB_Name = "Module1"
- Option Explicit
- Declare Function MapPhysToLin Lib "WinIo.dll" (ByVal PhysAddr As Long, ByVal PhysSize As Long, ByRef PhysMemHandle) As Long
- Declare Function UnmapPhysicalMemory Lib "WinIo.dll" (ByVal PhysMemHandle, ByVal LinAddr) As Boolean
- Declare Function GetPhysLong Lib "WinIo.dll" (ByVal PhysAddr As Long, ByRef PhysVal As Long) As Boolean
- Declare Function SetPhysLong Lib "WinIo.dll" (ByVal PhysAddr As Long, ByVal PhysVal As Long) As Boolean
- Declare Function GetPortVal Lib "WinIo.dll" (ByVal PortAddr As Integer, ByRef PortVal As Long, ByVal bSize As Byte) As Boolean
- Declare Function SetPortVal Lib "WinIo.dll" (ByVal PortAddr As Integer, ByVal PortVal As Long, ByVal bSize As Byte) As Boolean
- Declare Function InitializeWinIo Lib "WinIo.dll" () As Boolean
- Declare Function ShutdownWinIo Lib "WinIo.dll" () As Boolean
- Declare Function InstallWinIoDriver Lib "WinIo.dll" (ByVal DriverPath As String, ByVal Mode As Integer) As Boolean
- Declare Function RemoveWinIoDriver Lib "WinIo.dll" () As Boolean
- Public Declare Function GetTickCount Lib "kernel32" () As Long
- Sub TimeDelay(DT As Long)
- Dim TT As Long
- TT = GetTickCount()
- Do
- DoEvents
- If GetTickCount - TT < 0 Then TT = GetTickCount
- Loop Until GetTickCount - TT >= DT
-
- End Sub