|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
" f/ k! n9 F; L6 I [DllImport("winio.dll")]7 R( ^# k r6 e. h! w1 ^/ n0 r
public static extern bool InitializeWinIo();+ f7 r' r1 G1 D
[DllImport("winio.dll")]* i; {& W3 ~: }' T: d8 W
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
0 l# A: W+ a4 C- e. Q; ?1 @ [DllImport("winio.dll")]
2 m: d; T# _1 |8 `) ] public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
) V! d& t; [) a [DllImport("winio.dll")]
) }7 N1 T# n% V2 [0 E! _& ` public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);$ u# t1 f& c; I C$ f5 D; g
[DllImport("winio.dll")]) O7 J1 K( e8 J) j! q* W# n$ F1 S
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
2 U. _' _& i8 r' { [DllImport("winio.dll")]
' C6 ]' }! B6 S: Q v: j public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
% H. W( J$ Y9 w& g0 h3 X! Q2 O3 z# R [DllImport("winio.dll")]
8 ]+ _6 g& u0 e$ X public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
; m1 ?9 Y7 t% S [DllImport("winio.dll")]
$ j/ k) R0 P" B* G! k1 L public static extern void ShutdownWinIo(); |
|