|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译
) S5 r7 _4 v+ x w+ l [DllImport("winio.dll")]! J5 a: B0 R8 E; J, j8 {+ n
public static extern bool InitializeWinIo();' z- x. Y, v, ]& e7 [- i9 G
[DllImport("winio.dll")]
; g9 ^9 B7 r& C public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
% [3 F& F4 _$ S% @ [DllImport("winio.dll")]
% B9 G& b( L; ^- E7 U& Z public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);% l- r( C: Z3 ^- j: j: h3 O$ f( C4 @
[DllImport("winio.dll")]5 r$ x1 V: f ?, u* {
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
) f' ? W- |9 f& l [DllImport("winio.dll")]; z, p: k3 [' i. c$ y0 J5 E
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
. n1 X3 ~8 @& S4 K2 [$ M; O [DllImport("winio.dll")]2 v5 k. o4 r1 E* p4 H
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);9 z) s. P$ E1 K. x
[DllImport("winio.dll")]
) n% ~$ m, U: Z6 I. B public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
+ @0 O5 O o+ D) q. t+ F4 N4 l [DllImport("winio.dll")]
! c X) @' ^8 E( m public static extern void ShutdownWinIo(); |
|