|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
- ^( z6 x N+ T7 g$ Y/ A; m [DllImport("winio.dll")]2 V2 P, e* U7 ]9 b" @' W
public static extern bool InitializeWinIo();
! ^) [, j( Q2 w3 {: U [DllImport("winio.dll")]
& m0 X: f% B0 \/ P$ F public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);) d* v) u ]# C3 F0 k
[DllImport("winio.dll")]( z* Y# `$ ? G% {8 @" G
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
6 m# ]# r6 s( w- d3 B4 d$ a [DllImport("winio.dll")]
5 F2 j9 }4 i$ B( b public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
( l9 N2 x# d, D E) C0 A [DllImport("winio.dll")]
! m2 Y& Z* I! N0 C" h( X public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
3 e- k- W* F' n' e [DllImport("winio.dll")]- M3 s' k6 d' n# T" e; u+ d* w
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);6 J; y/ h N* v8 g
[DllImport("winio.dll")]
/ g' K$ b( E4 g$ A2 ] public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);. C8 c3 v2 R) l& Q
[DllImport("winio.dll")]* a7 ]. L1 @6 [
public static extern void ShutdownWinIo(); |
|