|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译/ j; R! R$ I0 d
[DllImport("winio.dll")] t( U* \: h& f5 W6 Z
public static extern bool InitializeWinIo();
9 w( t n M( X G [DllImport("winio.dll")]
% K6 F& K1 [: B( n8 |$ T public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);3 h/ l) O: e0 @3 a
[DllImport("winio.dll")]
$ `! R0 s1 x2 ~ { public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);& v" w8 M/ W& j/ ?) @3 d
[DllImport("winio.dll")]
, o, F" K2 K Q' r7 h; p public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
" d( B1 z$ O% h6 Y [DllImport("winio.dll")]7 X$ D. }: B+ g2 m
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
% s* z! e0 d% E, K( V. B% I [DllImport("winio.dll")]7 c$ n& J8 Y8 Z: p; ?: ~
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
6 x4 z* W& J/ V, M. [4 g: X- q [DllImport("winio.dll")]
* N/ \* ] G" ` public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
1 E) F! o+ M4 w% M0 Q% H [DllImport("winio.dll")]
8 c& s/ B9 z4 q. n. u+ e" P/ b public static extern void ShutdownWinIo(); |
|