|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译; S) a' ^3 x- {9 q4 W
[DllImport("winio.dll")]
/ U& {8 ]8 Q1 u, o/ G public static extern bool InitializeWinIo();
+ f: J8 ~& M) O# V4 [" N% Y" u [DllImport("winio.dll")]
" M$ ~8 A$ \! U0 c3 Q4 }& h9 o9 c) b public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
5 e# p4 h; ~4 Z& b: N [DllImport("winio.dll")]
6 w' W9 B8 S+ j/ c% N public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
0 l. ?3 E1 a' j9 C [DllImport("winio.dll")]
" R/ F. d: [! p* z. O; L! d0 |' |, e. ] public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);7 W( S6 q3 z+ P) \7 B# B9 {
[DllImport("winio.dll")]
" ~ k2 q6 \+ j8 o- n9 m public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);/ g7 ?. g- D; L$ r& g. @# G- \
[DllImport("winio.dll")]) N: w( z+ k- i! M" e" D( O
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
9 z0 A: P2 h" Z& C [DllImport("winio.dll")]0 }. H0 T$ k/ O: J, ~1 v
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
, V& K: h# c! T" y- p [DllImport("winio.dll")]
; X! E2 s$ g3 t6 h public static extern void ShutdownWinIo(); |
|