delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/17/11:18:12

Date: Thu, 17 Feb 2000 10:47:27 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Marcus <mesthlm AT hem DOT passagen DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: App still hangs on shutdowwn
In-Reply-To: <88ff40$2o9$1@cubacola.tninet.se>
Message-ID: <Pine.SUN.3.91.1000217104447.20415U-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019