|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
$ b8 l% ^9 _! C( {7 W [DllImport("winio.dll")]8 y7 K, i2 l6 h% N
public static extern bool InitializeWinIo();! D4 u; e1 r% d3 S
[DllImport("winio.dll")]
5 m- ?1 r# b) d) n public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
9 M& \) ?1 {* e/ d [DllImport("winio.dll")]
" v% [$ V! @+ E& t2 W) [ public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);6 t6 g. _7 V+ ~# ?) [3 |5 Z
[DllImport("winio.dll")]
# y+ E' i. ~; w" r4 U8 ~ public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);2 `0 J: M) q& w
[DllImport("winio.dll")]
: W W( u$ G9 ^ public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
+ K- r: n* \, J+ h [DllImport("winio.dll")]
" h' ]0 t3 L' ]( B9 t0 X' K public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
) Z4 x) u" m# u [DllImport("winio.dll")]. z( R' R N) u; _
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
! ]0 F3 Y( G; b5 ~$ b% c# m5 U: A [DllImport("winio.dll")]
6 [, H" i4 x9 w$ p' ^ public static extern void ShutdownWinIo(); |
|