|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
6 B8 I9 v _- t8 e0 P [DllImport("winio.dll")]
( ]. o$ |) j2 l0 t7 F e+ w) d public static extern bool InitializeWinIo();
5 M) v% g- E# Q. V. } [DllImport("winio.dll")]% y# Y) \/ G v: U$ \
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);7 l( ]: V8 g, j" R# \- r' x9 N; F
[DllImport("winio.dll")]
/ @5 K4 Z% D8 x! l; N( K/ H public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
9 f5 `' V4 ~2 u, m4 P [DllImport("winio.dll")]
; o: X6 c# u+ z2 N" R public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);( R F0 n+ H! T0 T! ^; i
[DllImport("winio.dll")]2 v8 A7 N# f7 h3 [/ R( o
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);8 T ^ a1 t7 }* T
[DllImport("winio.dll")]
% q7 d2 L$ H; O4 V7 [4 B public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);- ~, T P, K( a/ l2 {: p
[DllImport("winio.dll")]
. i; W2 c0 I( C" s0 y public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
( N2 b$ W& `+ O [DllImport("winio.dll")]/ w' \/ f. |* y) w
public static extern void ShutdownWinIo(); |
|