|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译( O8 T" o- i0 r. b; H
[DllImport("winio.dll")]
% z( W2 O: v; ^ public static extern bool InitializeWinIo();, w0 @4 U1 m9 i) Y( R& T h
[DllImport("winio.dll")]
) ~# q8 W4 I. J5 G! n public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);+ J6 n9 I9 v4 K8 @
[DllImport("winio.dll")]
. `3 E8 m5 @- U, U6 A public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
" m( j7 K' F6 t z2 a [DllImport("winio.dll")]
4 [9 N( p( h C0 a public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
4 H6 K8 j, S3 i" Z7 ? [DllImport("winio.dll")]/ [, @- Q' p" g/ { [
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
) z" C- C) D' A [DllImport("winio.dll")]
& b* V; E# e9 _" {3 \. N* { public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
5 z) c8 m: `( p# f: P' Q [DllImport("winio.dll")]
Z, S& D% U6 u8 Z- j+ } public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);9 ~) N* p u- e
[DllImport("winio.dll")]
& f/ I! ~4 ?4 e5 f2 D9 e0 u public static extern void ShutdownWinIo(); |
|