|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译4 l: M: V( M1 H9 e, x5 ?* u. X3 m
[DllImport("winio.dll")]3 L& a4 A& r* Y1 U' M
public static extern bool InitializeWinIo();
7 e6 l+ p# r& ]9 L [DllImport("winio.dll")]
* F, @: P% O2 Q) G8 ? public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
6 K0 M$ N) a7 G! L [DllImport("winio.dll")]6 E6 W) q0 G0 d* i. `$ j
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);; k6 J/ E- \. c5 T6 ~- X4 J
[DllImport("winio.dll")] j4 g5 Z) y: }
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
1 K- K& d$ H, Z) M [DllImport("winio.dll")]
6 P3 W: {# j, k; I9 f& x public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);3 E y4 u9 R" |* I/ `4 Z# w
[DllImport("winio.dll")]
4 y: ?" H6 l% T7 ?- w9 t/ w: {. z% C public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
/ w; u) [/ u; f/ L) U [DllImport("winio.dll")]
, k8 a4 D2 I: s public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);* g" _, [& \9 `2 D2 \( [
[DllImport("winio.dll")]9 D, x& O9 ?" @. N6 q* i
public static extern void ShutdownWinIo(); |
|