|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
* y% { R. y w5 [3 Q7 g; [ [DllImport("winio.dll")]7 ?4 Y& T: `0 |. k
public static extern bool InitializeWinIo();* A/ B9 u, m6 W4 z0 v/ q
[DllImport("winio.dll")]! G$ B$ B8 W( Q8 g5 i9 j' @" u: x4 \
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);$ ~; C7 C$ o/ R$ E; O& l0 ~
[DllImport("winio.dll")]0 h$ @. b% n) T: V! `+ }
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
3 i9 w( N1 U- o) u; Y3 M [DllImport("winio.dll")]/ Y. T6 J2 ?% C1 H/ d
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
: [& t/ i5 r, ~3 G% B9 h [DllImport("winio.dll")]
# t- ^2 J$ J# H( a/ Q. y7 D' S: C; o public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);+ E7 M& I; T+ N$ {
[DllImport("winio.dll")]2 @5 C1 v; }0 ^# U) [9 S9 C. ^
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
' F ~( F( ^) U" L; A9 _ [DllImport("winio.dll")]3 @0 L2 R; ~1 r/ l4 K
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
+ g$ ?8 V: p/ X# U. O [DllImport("winio.dll")]
; f: E$ P! Z) u$ O' w: A public static extern void ShutdownWinIo(); |
|