|
发表于 2008-6-17 13:16:14
|
显示全部楼层
WINIO在VISTA下可以直接用的,不需要去重新编译4 Y/ E2 i$ `- _5 @
[DllImport("winio.dll")]$ s- Z/ L4 m$ k- s, f1 U+ Q3 \: [9 h( M
public static extern bool InitializeWinIo();% F1 W' G) c# O5 V/ F. F0 p4 I
[DllImport("winio.dll")]! {! j2 `9 @, {/ v2 k0 W
public static extern bool GetPortVal(IntPtr wPortAddr, out int pdwPortVal, byte bSize);
/ ~6 Y3 E' t' f& L [DllImport("winio.dll")]
5 r& d" j3 i5 \. z7 y9 M9 M; @ public static extern bool SetPortVal(uint wPortAddr, IntPtr dwPortVal, byte bSize);
# d% |% R" b% _4 Q4 v, y4 { [DllImport("winio.dll")]
0 Z6 a; i* k) e Z! K1 A" e8 D9 z6 S public static extern byte MapPhysToLin(byte pbPhysAddr, uint dwPhysSize, IntPtr PhysicalMemoryHandle);
8 @# t( V8 F6 G( w' w [DllImport("winio.dll")]
1 P$ [" U, j& {) t+ t+ L public static extern bool UnmapPhysicalMemory(IntPtr PhysicalMemoryHandle, byte pbLinAddr);
7 ~$ K1 T& b3 [ q8 i [DllImport("winio.dll")]9 e; i6 }0 J q3 x
public static extern bool GetPhysLong(IntPtr pbPhysAddr, byte pdwPhysVal);9 r y- P4 d9 ?- l. u9 m9 Q9 p- e7 G
[DllImport("winio.dll")]
3 o2 M9 f2 j( V: U: q: N6 T$ \0 z public static extern bool SetPhysLong(IntPtr pbPhysAddr, byte dwPhysVal);, Z8 I: `: L3 F+ ]* G
[DllImport("winio.dll")]
5 o! I8 B8 ~+ | r public static extern void ShutdownWinIo(); |
|