|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
: v' \" i+ p& @ [DllImport("winio.dll")]
4 |+ p$ \8 k/ }3 N3 | public static extern bool InitializeWinIo();3 P" ^# ]" q: u/ r% _1 L
[DllImport("winio.dll")]
1 a9 [8 P9 S; g7 ? public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);8 ]/ ?+ W5 ~' e" E
[DllImport("winio.dll")]# s+ J& I" H, e0 V" [8 s
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
5 ^2 g# i7 K* p# i [DllImport("winio.dll")]
! p) T* `8 l9 c4 Z# @ public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);6 M8 ?6 S: l$ H# x5 w* m# s$ f
[DllImport("winio.dll")]
+ a+ n: f1 M' u- a8 B. b8 a public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr); g3 M: m+ g, ? H- U
[DllImport("winio.dll")]) w9 v+ l( D8 t* |; g' V
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
: q- R6 W% e* J7 |- S8 G3 Q+ Q& D% C, w [DllImport("winio.dll")]
+ k. x5 R1 M9 x* G public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
; f; n. x- Y* s; r [DllImport("winio.dll")]
9 p& p( Y: N" l# l. y1 S3 T public static extern void ShutdownWinIo(); |
|