|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译 q4 F. Z, ~8 u8 @, x. Q, P
[DllImport("winio.dll")]
" k2 S+ c8 ~- Z0 \% Q# h public static extern bool InitializeWinIo();
" |3 ?- e8 K% {1 A& V& M [DllImport("winio.dll")]6 H& V1 I& q* r0 o0 {
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
3 M5 y4 f- a% T& V; j6 T [DllImport("winio.dll")]4 @' { T# r7 x" r+ _' u; Z
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
' |; I: y* D' A, w6 i [DllImport("winio.dll")]
2 J3 ?) i$ N) D. ^3 m# q public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);' Q! ]' v( J, x+ g$ g3 w$ I* U
[DllImport("winio.dll")]
: a: A6 r/ p/ x5 P. D9 Z public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);9 {, Y6 n$ X2 L/ @
[DllImport("winio.dll")]
# `' E2 r( u# l+ G( a1 p1 z" c; v: C public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
2 ^$ F! \* |7 d9 q+ o [DllImport("winio.dll")]6 [3 M, e/ W/ U% [
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);8 o9 s: z1 ]# C/ ]. p/ n% V
[DllImport("winio.dll")]
; c7 J$ }% w/ L5 L1 |3 ~ public static extern void ShutdownWinIo(); |
|