Mail Archives: djgpp/1999/04/25/06:01:01
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> writes:
> On Thu, 22 Apr 1999, Kevin Hise wrote:
>
> > Isn't there an interrupt listed in Ralf Brown's list that allows a DOS
> > app to detect when Windows has switched it away?
>
> That's the catch: there isn't any (at least AFAIK). If anybody knows
> how to achieve this, I'd certainly like to add that to the FAQ.
.................................................................
Interrupt 2Fh Function 4001h
mov ax, 4001h ; Notify Background Switch
int 2fh
Notify Background Switch notifies a VM application that it is being
switched to the background. The VM application can carry out any
actions, but should do so within 1000ms. This is the amount of time
the system waits before switching the application. This function has
no parameters. This function has no return value.
After switching to the background, the application continues to run
unless it attempts to access video memory. If the video adapter is in
a video mode that the virtual display device (VDD) does not support in
the background, the VDD freezes the application until the application
can be switched back to the foreground.
======================================================================
Interrupt 2Fh Function 4002h
mov ax, 4002h ; Notify Foreground Switch
int 2fh
Notify Foreground Switch notifies a VM application that it has been
switched to the foreground and can now access the video memory and
registers without being frozen. The virtual-display device (VDD)
calls this function. This function has no parameters. This function
has no return value. Under certain error conditions, the VDD may call
this function without calling a corresponding Notify Background Switch
(Interrupt 2Fh Function 4001h).
======================================================================
--
Samir Barjoud
samir AT mindspring DOT com
- Raw text -