|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译* X7 U- R V' @0 u7 S8 |! }
[DllImport("winio.dll")]$ A5 \2 B ~: l/ _+ |
public static extern bool InitializeWinIo();. ?2 j1 A9 q- n; E1 q
[DllImport("winio.dll")]% |+ r, |) {6 Z1 C
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
* G* }8 h" l @1 L% w- Y [DllImport("winio.dll")]
& N7 A+ z% U9 N. I( F6 D+ U public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);4 | Z2 y3 j6 K7 u
[DllImport("winio.dll")]8 N+ O; S( E- t3 G' s, o4 P
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
% b) ~& b) s7 G& S( L7 c- ^: Z! @ [DllImport("winio.dll")]
( P7 U! u& K7 s+ D2 e$ O public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);3 @7 J. `/ L/ q: z: l0 r" K
[DllImport("winio.dll")]
8 P5 }& n2 G- s S. e- i public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
: J3 O, l+ q: H3 M1 L- \" f+ Y [DllImport("winio.dll")]
1 O% t1 M& T. K9 [& L public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);6 N( s Y3 g. `1 c7 S
[DllImport("winio.dll")]/ g. b7 n9 o# a. C0 g* o1 z
public static extern void ShutdownWinIo(); |
|