|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译- [9 Y- s p: {& |: C
[DllImport("winio.dll")]8 d4 L% V$ Q$ Q: J2 Z* z
public static extern bool InitializeWinIo();
% ~, d! @( H6 E, O9 l5 S [DllImport("winio.dll")]
- O- `( [9 W1 r2 C: i% ? public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
7 x0 {2 b9 `( Q. S, V/ F [DllImport("winio.dll")]
q6 B8 c/ ], {* p" P4 C public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);) ?" P- H- m* w) q$ D; Y3 K
[DllImport("winio.dll")]$ Y6 a( t" ~/ O0 A% w& x
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);' J( d4 z B* h* ?( H. g
[DllImport("winio.dll")]6 q: H- o% M9 O: {
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
/ k; s. E( C2 r; F* z" I [DllImport("winio.dll")], C( l5 Z S' h9 {# @4 Q9 G0 l
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);) u6 X% g& j: N
[DllImport("winio.dll")]
3 V; ~& |) R( Q4 c, g( x- b public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
3 x- h( q7 `9 Y D' U+ f [DllImport("winio.dll")]+ w1 s" q/ B6 W* v$ x* B1 W* F# \
public static extern void ShutdownWinIo(); |
|