|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
8 F( ]2 O) S0 M- {7 J [DllImport("winio.dll")]5 T2 w3 P1 \: M B' ? x, S
public static extern bool InitializeWinIo();$ b% o% F$ C8 E2 M6 h+ a3 E
[DllImport("winio.dll")]' F- v9 N' [" }. u% Y$ s
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
& c* G: d0 E* ]" \* T [DllImport("winio.dll")]
6 H" c$ T8 u7 s% u9 |5 C- {: C public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
( X8 n9 l6 Y8 R- C. y/ ~6 B [DllImport("winio.dll")]
) @& G U1 |- C* a public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
7 k6 f! b6 v. q2 r- O( ` [DllImport("winio.dll")]; |% L* K' @8 V+ u$ \9 `* T
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
4 w! X6 W/ |! [7 C# D [DllImport("winio.dll")]
5 A1 Y# j/ P: ~% n7 Y0 g- L/ f) G public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
. X* s" o: p C6 V- r- i% y [DllImport("winio.dll")]
2 J+ Z. R8 F# r% G7 Y' C public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);8 k% l) e, ~' y
[DllImport("winio.dll")]! x2 c# E( S8 M# s; z4 j
public static extern void ShutdownWinIo(); |
|