|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
9 K- n6 ~3 Z& V, L4 w: v+ d [DllImport("winio.dll")]$ a4 z& d3 K- H) h% D2 B7 w0 E! c
public static extern bool InitializeWinIo();2 X2 t) {- x5 ~" J$ M
[DllImport("winio.dll")] E. n p: ~0 S! N* T
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);) y) d$ G% @7 A* ~) U
[DllImport("winio.dll")]" r k7 m9 L9 r K- q
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
* ]$ s# V9 q' v1 h5 t [DllImport("winio.dll")]1 O, j% X$ G$ x, w8 Q
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
/ k: s* V( @* g2 P" J# m [DllImport("winio.dll")]9 y3 h/ n9 Q% ]& n( U
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);; h$ z6 n6 S$ C2 t+ G, S
[DllImport("winio.dll")]2 |: Z, P; F) s9 A0 y
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
# h( V i! p, v: Z- ]+ K [DllImport("winio.dll")]
: l" X$ c7 N6 ?! V! i U; ` public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
7 b7 f( Y X" ?0 @4 c [DllImport("winio.dll")], S- t" k: n+ g! D5 F
public static extern void ShutdownWinIo(); |
|