|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译8 W1 N- h9 f& |# W
[DllImport("winio.dll")]
2 @9 q6 Y# u! Q/ D9 e* z( _# e$ ` public static extern bool InitializeWinIo();: x1 J: T' [ c {8 k
[DllImport("winio.dll")]% R. ]2 @! f* n/ g2 G3 x; W' N# @# y, U
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);: P! K9 }4 X3 S% i
[DllImport("winio.dll")]
. d0 n0 U9 p+ [ public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);7 ~8 L6 V0 z3 i8 l: r8 ^: d7 N5 ~, r
[DllImport("winio.dll")]
2 R/ E: q$ I: x4 t; | public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);0 n+ Q) U3 y9 S& [2 B' Q
[DllImport("winio.dll")]$ h' v& j2 K6 ]$ i
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
; i8 T5 N) D1 J6 f [DllImport("winio.dll")]. Z( e% M6 O, q3 D: c
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
% { i1 V' }7 {5 y0 p+ ~7 {+ |7 v [DllImport("winio.dll")]
! b8 C5 C3 n& X) I6 V) |- i! b public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
1 Y- {. n& ]: R) f9 ] [DllImport("winio.dll")] a) I+ A$ }1 i1 [8 F7 z
public static extern void ShutdownWinIo(); |
|