|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译, m; p/ F9 c' C X/ }
[DllImport("winio.dll")]
I$ [5 Y! {! t public static extern bool InitializeWinIo();* {. n" a' ^" ]# p4 j
[DllImport("winio.dll")]1 C2 t" u1 l( s
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);* C) w/ r) s! }7 o3 p3 d
[DllImport("winio.dll")]6 e1 Z7 _ _) O5 I, b5 D
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);4 W0 K, C& n& G3 L3 |
[DllImport("winio.dll")]
2 Z9 w" `' n: w0 W: K c public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);: W8 n( `/ a) U3 f1 T$ m5 ]$ C. } M
[DllImport("winio.dll")]& A$ O V- g9 @$ X% N& _. O
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
% c( m4 U1 |# @ [DllImport("winio.dll")]3 n# }9 g7 L1 n I
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);! B: J+ ^5 u) E& k$ s6 f
[DllImport("winio.dll")]
* W) `/ \0 P% M+ o% s/ y" ^: Y public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
# X/ w( Q. o* s3 \* e [DllImport("winio.dll")]
* u0 p g5 P a Y public static extern void ShutdownWinIo(); |
|