|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
/ O6 E5 _% |; x5 T6 P [DllImport("winio.dll")]$ ?3 k. W4 g" V/ G
public static extern bool InitializeWinIo();
& t4 `+ N% q: f [DllImport("winio.dll")]
; v U7 ^" m/ L6 b7 ~. \ public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
9 g, \7 _- s' o& ?6 `8 t [DllImport("winio.dll")]% f# g' c+ @, m t, s X. T
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);: h# T! X1 E$ {( [, K8 ~9 z% P) q: A
[DllImport("winio.dll")]
S* W7 d& p6 t public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);- J! w. o% O+ m) a) N1 _9 c
[DllImport("winio.dll")]
9 n* Z) }! O( j1 R1 F. ?8 z public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);# [* e7 }+ ^) K( I" k
[DllImport("winio.dll")]" u7 z D: i% c5 y- Z6 O: S
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
4 C# ^" f4 ^ k/ j2 m( } o- r3 g9 | [DllImport("winio.dll")]
1 _% H/ S! s) a3 b public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
/ e( Z3 X+ ^" O; ]% [ [DllImport("winio.dll")]& @9 Z' r7 M5 I+ K9 o3 ]/ v4 x ^! A
public static extern void ShutdownWinIo(); |
|