Date: Thu, 17 Feb 2000 10:47:27 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Marcus cc: djgpp AT delorie DOT com Subject: Re: App still hangs on shutdowwn In-Reply-To: <88ff40$2o9$1@cubacola.tninet.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.