|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译 R3 k5 n' N2 q# \8 p7 e7 Q
[DllImport("winio.dll")]/ ~. m2 J8 a# O% ^: L2 b" r
public static extern bool InitializeWinIo();3 |: N c* e: l/ M- i+ {* u
[DllImport("winio.dll")]! t3 A& ~! F, O% D8 P
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);! ]: x4 P9 Z4 s% w
[DllImport("winio.dll")]
& H& Y% K4 Y/ l1 ^% z8 l' S& E4 l public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
, C, ?3 k( @8 \0 H+ a [DllImport("winio.dll")]5 h3 y$ ~, f5 Z0 c
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
+ o; Z! }; e+ v( T0 Q, l9 w! V [DllImport("winio.dll")]
1 v6 p# `8 N- @2 ]" ^9 k public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
* w# B( ~. z1 H [DllImport("winio.dll")]
8 `/ L$ o: a$ N# S3 P0 { public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
- y# ?! r2 k I [DllImport("winio.dll")]! @$ U3 u$ ~7 E: H2 a5 j0 V
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);0 J/ [3 \' k# ~& h* F t4 S) O
[DllImport("winio.dll")]
, `0 l2 S( E8 M" A" s9 P public static extern void ShutdownWinIo(); |
|