Date: Mon, 15 Jun 1998 10:00:01 +0300 (IDT) From: Eli Zaretskii To: Charles Sandmann , Jan Humme cc: djgpp AT delorie DOT com Subject: Re: How do I gracefully terminate my TSR application? In-Reply-To: <3583a440.sandmann@clio.rice.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 14 Jun 1998, Charles Sandmann wrote: > For a DOS TSR to go away, you need to unhook all interrupts and deallocate the > memory. Don't call 0x31 again, just free the DOS PSP and environment (cwsdpmi > does this for it's own image). Unwinding the DPMI image is a more difficult - > you need to do an exit() call which frees the DPMI memory, frees the selectors, > etc. There must not be another DPMI image running "nested" under the TSR - > the signal for it to exit must come from a real mode program. > > Reading the paragraph above - hummm - yes it's possible but very complicated. > It may even be a bit different under different DPMI providers. In that case, maybe it is better to not uninstall the TSR at all, only make it transparent (i.e., every interrupt is just passed to the previous handler in the chain).