|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
5 ~0 G1 E* _; B$ y4 z) x' B [DllImport("winio.dll")]
" w u' I, X% P, [8 W public static extern bool InitializeWinIo();
) t- m" P3 c+ ^0 d) D4 [ [DllImport("winio.dll")]
7 L0 {( `7 i6 @. \) R& |' V# ?! p public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
8 x7 g" ?- Z0 O' _ [DllImport("winio.dll")]
/ S& g" h5 w3 T' ?6 g! [6 w public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);3 J b2 W! Z6 d5 b* A. o }
[DllImport("winio.dll")]
- O! e j2 H, F+ W! ]7 K# d( u8 f public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
) e* G J; Z8 h8 h: P/ `5 F, r) R [DllImport("winio.dll")]" X, h; q% ~% p% c7 {3 n- R4 x, k4 C- D
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);: P3 h, n5 m' l6 h5 v
[DllImport("winio.dll")]6 H/ e0 A Z# X, s5 c8 d
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
! a5 K( `. ]# t1 e4 [' S [DllImport("winio.dll")]+ n5 N; ~- x$ E) r% w0 O. n
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);8 k& {6 O- m$ U
[DllImport("winio.dll")]+ w' i" |2 O* l7 z9 @* i9 u3 Z0 ^3 \
public static extern void ShutdownWinIo(); |
|