Programming 版 (精华区)
发信人: zpw (zhao), 信区: Programming
标 题: FAQ FOR VXD(十三)
发信站: 紫 丁 香 (Tue Jul 28 14:21:55 1998), 转信
How do I allocate memory from a Win16 application that can be accessed by a VxD
at interrupt time?
In order to allocate memory that is safe to access froma VxD at interrupt
time, you must perform several steps.
GlobalAlloc() Allocate a block of memory.
GlobalLock() Keep the segment in memory.
GlobalFix() Prevent the segment from moving in linear memory.
GlobalPageLock() Prevent the memory from being swapped to disk.
Then, pass the segment:offset address of the memory block to the VxD. The
VxD can use the MapFlat service to translate the memory address to a linear
address for use by the ISR.
--
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: yaoyu.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:4.485毫秒