|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译) {* l" ~4 S) ^% b `
[DllImport("winio.dll")]0 Q1 F5 z6 h1 f/ e7 U
public static extern bool InitializeWinIo();5 @. ~( Z* P) V! f& Z+ r0 m8 X& I0 i5 v
[DllImport("winio.dll")]7 F) X" c; E4 S% o
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
1 r5 C" V7 W' f; P4 w. Y3 M- j8 ] [DllImport("winio.dll")]
! G3 ^0 U- Z$ j \& J8 s% t public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
2 W& ]" J7 R; b' p5 F [DllImport("winio.dll")]8 W2 T! O- w3 ~, g9 f% c
public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);. m, b: e- f7 u
[DllImport("winio.dll")]) ]9 l3 c2 G- j, I O
public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
- B7 X* b) y/ _. L; [6 P [DllImport("winio.dll")]
7 \" k5 _- ?: A0 `6 O) ]/ p public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);
* P) k. p- T5 u; C5 r [DllImport("winio.dll")]- @7 |7 _& C9 v4 \) h+ p& T
public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);& R$ U" g( F4 L- {
[DllImport("winio.dll")]
8 A3 `" _8 P0 ]! V public static extern void ShutdownWinIo(); |
|