|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
$ E: e, n" M" E# u5 X+ { [DllImport("winio.dll")]
1 e1 H9 s! S) W' I# J" l2 ` public static extern bool InitializeWinIo();( T& ]9 J' Y# n
[DllImport("winio.dll")]$ H9 k3 w& S* N7 _9 L
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);6 U7 i$ _' @2 v0 v7 `
[DllImport("winio.dll")]! C" o# G- T: f S8 g! e
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);+ M6 H6 g& z) N- y+ N$ @+ m/ P
[DllImport("winio.dll")]
; I* }8 }0 T+ y2 a public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);7 u8 u- z q8 f: l
[DllImport("winio.dll")]
5 ?. j2 g e, v5 i V& } public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
* M1 c, Q9 y5 x3 h) L e; E4 I [DllImport("winio.dll")]* O0 `$ w& g' _
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);: O- H7 d; H9 N7 F; r$ N) J
[DllImport("winio.dll")]% e `5 D- B' ?; e7 l& c# C) s o# g
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
. {0 D# g( K- V: Y1 k: k [DllImport("winio.dll")] {& C' I8 E7 |( d6 g
public static extern void ShutdownWinIo(); |
|