Mail Archives: djgpp/2000/02/17/11:18:12
On Thu, 17 Feb 2000, Marcus wrote:
> My application seems to STILL hang sometimes on shutdown. And it's because
> of the mouse handler.
Are you sure? If you leave all the source, but comment out the single
line that calls initmouse, does this prevent the program from hanging?
> To shutdown:
> void uninitmouse(void)
> {
> __dpmi_regs regs;
> regs.x.ax = 0xC;
> regs.x.cx = 0;
> regs.x.es = 0;
> regs.x.dx = 0;
This is wrong: ES:DX should point to the callback address, like this:
regs.x.es = callback_info.rm_segment;
regs.x.dx = callback_info.rm_offset;
That's what the FAQ says: make exactly the same call as you did in
initmouse, but with the mask set to zero.
- Raw text -