CMDStopFG

The CMDStopFG function requests that the foreground thread be suspended.

MS-DOS

USHORT FAR CMDStopFG(

    USHORT timeOut

   );


Parameters

timeOut
Maximum time to wait for the foreground thread to return from MS-DOS before stopping it.

Return Values

0
The foreground thread was successfully stopped.
nonzero
The foreground thread was stopped within MS-DOS.

Remarks

The emulator should issue this call when it wishes to enter the foreground. If the return value is nonzero, the foreground thread has been stopped within MS-DOS and it is not safe for the emulator to come to the foreground. Under these circumstances, the emulator should restart the foreground thread by calling CMDStartFG.

If the call was successful, the emulator should save the contents of the screen before writing to it. When returning to background operation, the emulator must restore the screen and call CMDStartFG to allow the previous foreground application to continue.