Date: Tue, 15 Feb 2000 08:00:36 +0500 (MVT) From: Prashant TR X-Sender: prashant_tr AT midpec DOT com To: Marcus cc: djgpp AT delorie DOT com Subject: Re: System hangs when I exit my program In-Reply-To: <888om7$o0t$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 Mon, 14 Feb 2000, Marcus wrote: > I have a big problem. My program can't shutdown correct and hangs on > shutdown. Sometimes the system hangs too. I use VESA 2, a mouse hook and a > keyboard hook. I think the hooks are the problem since I don't know how to > quit the mouse hook I do with INT 33 - Ch. But I don't actually know what > the problem is. Most likely, it's the mouse handler. When you quit the program, the memory used by the handler previously gets freed. The system works fine for sometime or until you do something that uses memory (ex: running another program). The solution is to just reset the mouse just before exiting the program (you could put that in an atexit function).