|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
9 J% I$ k5 i; O" n% [6 X0 o [DllImport("winio.dll")]
& [; `% w" u1 R; l# b1 o h- x public static extern bool InitializeWinIo();
" h- i$ \( s& l5 i [DllImport("winio.dll")]
/ U: M' |1 ?4 W: Y public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);, h9 h6 B5 y# G
[DllImport("winio.dll")]: P- P% c2 x4 h& G4 X" f
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);( \4 e$ m% }+ {9 A$ W( \$ w$ d3 y
[DllImport("winio.dll")]
: |. L, G- p5 p public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
2 ?% B$ l" D) e* j4 E, k! b @ [DllImport("winio.dll")]
4 s) q( g3 R9 m public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
, m. z5 i2 w7 h5 B3 r; F [DllImport("winio.dll")]9 ^2 v. I: Z: J
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
0 P. T& N! D" z9 s [DllImport("winio.dll")]
' a5 b) I3 e0 e8 ~- M" b6 z2 @ public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
2 R" Z/ K" V7 G% a! G [DllImport("winio.dll")]
4 D, ?) F! D. @3 B8 I$ a1 H' B+ P4 p public static extern void ShutdownWinIo(); |
|