|
|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译" G( V/ A! _# P, F# A5 s
[DllImport("winio.dll")]
0 S6 o& r9 ]/ i9 A! O public static extern bool InitializeWinIo();
) g0 C$ h, Y- Y: c3 ?( p' ]0 g9 d1 R [DllImport("winio.dll")]
9 p; Y3 g- e# R% s# p/ w public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
! b6 L8 T, J. K0 L2 i8 Y8 _ [DllImport("winio.dll")]4 o5 v% v# Q' M m0 G' z6 h
public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
' i" T" p8 i. c4 S [DllImport("winio.dll")]
7 t7 |9 |- `. W5 {; l* s8 x: |( V public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
% G t, a) s* _5 f6 a* ?6 Q) ?$ |/ D [DllImport("winio.dll")]( x8 C- J1 V' r j! [
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);. R: a: E7 f: f& D/ f
[DllImport("winio.dll")]
, o2 ]7 i( H$ g9 ~! m* I public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
2 V7 z4 B6 b& y2 \9 w. C, R4 ? [DllImport("winio.dll")]
1 P4 C$ G! C. d) ?8 `+ \ public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);
, Y& n# z: f. k" V! Z [DllImport("winio.dll")]+ ~- | c( E3 V
public static extern void ShutdownWinIo(); |
|