Mail Archives: djgpp/2000/02/14/21:42:19
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).
- Raw text -