|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
0 H% Q3 Q) z# S7 u" H [DllImport("winio.dll")]
1 S7 T8 m# R6 e- V public static extern bool InitializeWinIo();7 ~ ]( L) S1 s" x
[DllImport("winio.dll")]# q5 S+ A3 l( n4 U/ F
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);) G# A: A& U5 a
[DllImport("winio.dll")]
% Q- n/ \! o1 N6 T$ H public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);! C! A) z, V, F" ~3 F6 R
[DllImport("winio.dll")], t/ ^& i: U7 p4 q7 I
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);5 X9 p. \, H. n: Y* m
[DllImport("winio.dll")]8 u: w- A4 p+ o% e' E _ {8 o
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
1 \- R- K: i: N. h4 y4 i [DllImport("winio.dll")]
+ g2 }4 H( i6 G, x& f public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);5 [( p3 u. U6 D
[DllImport("winio.dll")]+ U. u' J# w7 f B
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);$ S; _8 l! l. `- E- J7 c' I; G
[DllImport("winio.dll")]
" q" W3 u" U1 d3 w public static extern void ShutdownWinIo(); |
|