|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
2 k9 D; G* B1 ^0 j/ l0 ?+ ?1 { [DllImport("winio.dll")]
; v+ [! n+ A+ l9 Z# a& {+ V public static extern bool InitializeWinIo();
3 A: g# J7 c6 ~9 X [DllImport("winio.dll")]
% c* |# K* u! @0 z7 w" f public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
- V7 B# ]6 p2 C/ j I. D [DllImport("winio.dll")]. X) P' o& Q2 R5 S# U% A
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
# w: a. q, N0 L* v [DllImport("winio.dll")]8 a0 D. \ R: T& d' I
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
5 K V/ `5 ~& M! N [DllImport("winio.dll")]' w: ~* g$ U- k/ D I" D
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
: Y: t/ s5 o8 Q [DllImport("winio.dll")]) i5 O) V3 M0 Y1 w
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
0 \. j# r2 h* h! q/ @ [DllImport("winio.dll")]
+ W) @' }. j$ a! A public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
1 r' b! z! o$ n$ X [DllImport("winio.dll")]
3 S& |* I3 M% s8 g7 o2 K& ] public static extern void ShutdownWinIo(); |
|