|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译/ ], c4 ]1 u0 ^. m" B
[DllImport("winio.dll")]- Q6 O! m. G2 L
public static extern bool InitializeWinIo();
2 t- f9 v) \5 b [DllImport("winio.dll")]4 w2 [6 M& q. H/ ^
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
: T) p/ N4 v U8 d* _ [DllImport("winio.dll")]
( v1 @% {1 V; M3 h& d9 x7 S public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);1 E' `5 H* h$ V. B# h* T3 `$ w9 [
[DllImport("winio.dll")]* F0 z/ t% A6 S1 _0 U: f1 y: c
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
7 B: W9 J4 }8 ?2 q [DllImport("winio.dll")]
6 l- H- `# E( H6 P% j+ C( k9 p public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);# z! P2 @ Q6 G( G/ J
[DllImport("winio.dll")]
; B% @. T6 N1 o3 B$ m# G+ L/ A7 C* n7 r public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
+ j* b% ^% \0 y- I8 B! Y& O3 w [DllImport("winio.dll")]* b: O% f; I* ~9 I3 J1 z
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
* C$ Z4 \% v0 ?+ O6 {' O$ \# }! x [DllImport("winio.dll")]
8 z7 q6 S& p6 G# Y% U8 Q public static extern void ShutdownWinIo(); |
|