|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
0 z& l+ e; u, w6 e; n5 P% y [DllImport("winio.dll")]
3 s7 ^% U* ~2 u public static extern bool InitializeWinIo();2 `6 d5 S5 V& T0 A
[DllImport("winio.dll")]$ c0 J. g$ e' _+ n. b/ `- R- a
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);* R9 s7 G. i; H( m9 L' @2 X/ J
[DllImport("winio.dll")]
8 O* E. A* f7 u7 f- J5 q, [& m( i$ v& c public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
2 Q: p6 o; U: m$ ^ [DllImport("winio.dll")]
& Y3 P9 f6 U/ ?9 }) t2 q public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
$ l* ^3 }) A2 Y: f6 N# N [DllImport("winio.dll")]* J8 t: x; z: Z4 o
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);3 G8 B, E9 C+ d j+ k% W
[DllImport("winio.dll")]" A* G& ~" @# y# ^9 j
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal); W; \& {; Q: A6 f: r) k0 K
[DllImport("winio.dll")]$ Y1 I3 G/ P) T" ^6 \9 d" y
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
; }8 ^+ p( q1 E$ u [DllImport("winio.dll")]* k5 U% s/ c. E8 a$ E6 Y# a
public static extern void ShutdownWinIo(); |
|