|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
; u* b/ U1 z3 C' O8 S [DllImport("winio.dll")]
8 M, Y: T9 ]7 c' U3 U4 c8 s public static extern bool InitializeWinIo();8 r- ^ Y- U# P; N
[DllImport("winio.dll")]8 w( a9 U. m9 z, ~6 F8 a
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);3 x& T4 ]7 u) }& |2 F
[DllImport("winio.dll")]
& k) I _! ~7 s! J8 a2 w _+ m public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);2 ^4 ]0 P8 y5 J: U& x
[DllImport("winio.dll")]. Z T( q0 D9 u- s+ R' D. i. f
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle); I# I! D8 e+ \
[DllImport("winio.dll")]
6 Q, A9 h6 g; g) P4 b0 X4 w3 A( c public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
- }& G f" N3 q8 J* O. v [DllImport("winio.dll")]
8 m# B+ N+ L' V- J* K5 s r public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
# c* Z6 k7 }3 s J- S [DllImport("winio.dll")]7 Q& N8 c. i6 j7 }9 Y! C) l
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);+ x8 d& |3 ]) P# V. q. u2 p5 h+ D
[DllImport("winio.dll")]
* I ?* `6 u- |1 [ public static extern void ShutdownWinIo(); |
|