|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译- @2 w5 w. w3 z. _! S
[DllImport("winio.dll")]) E8 a, ^3 q- _3 {$ E5 }2 Z+ ]
public static extern bool InitializeWinIo();
. z1 Y& ?: l- {% S# @" X1 [ [DllImport("winio.dll")]
5 Z& M# m2 p; v/ R6 w& u# } public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);0 j: k5 Q/ n: b: M
[DllImport("winio.dll")]
0 F S" y, j0 A7 Y @* t; G8 ? public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);( o+ g2 l# U; b* t7 J# t! y
[DllImport("winio.dll")]
$ H% @' O2 U% a3 {3 {& t* `9 y public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
& w; Z+ y8 t7 V9 V- B" ^% z& t [DllImport("winio.dll")]" {+ n r( Z. ~$ d# O& u. h
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
$ u! C( b) Z+ B [DllImport("winio.dll")]: c- }0 G8 U( W! L
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);5 @: A( W3 ^: Y1 g
[DllImport("winio.dll")]
+ G7 ^0 n' @1 N3 } public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);: s( s# u, v. k* ~, u2 }
[DllImport("winio.dll")]# y! ~+ ]3 `6 A2 M) J
public static extern void ShutdownWinIo(); |
|