Windows 95 supports applications written for MS-DOS. Each MS-DOS – based application can run as a full-screen application, or it can run in a window on the Windows 95 desktop.
The system can run multiple MS-DOS – based applications at the same time. To do so, it creates a separate virtual machine (VM) for each MS-DOS – based application and shares the microprocessor among the MS-DOS VMs and the system VM (which contains all Windows-based applications). A VM can run an MS-DOS – based application in either the virtual 8086 mode or protected mode of the microprocessor.
Although most MS-DOS – based applications run fine in a window or as a full-screen application, some may not. To ensure absolute backward compatibility for all MS-DOS – based applications, Windows 95 provides a separate operating mode called "single MS-DOS application mode." When in this mode, Windows 95 runs only one MS-DOS – based application at a time. No Windows-based applications run in that mode; in fact, none of the graphical user interface (GUI) components of the system are even loaded.
Windows 95 supports the complete set of MS-DOS system functions and interrupts and provides extensions that permit MS-DOS – based applications to take advantage of features such as long filenames, and exclusive volume locking. For more information, see MS-DOS Extensions, Long Filenames, and Exclusive Volume Locking.
Disk utilities and other applications that directly modify file system structures, such as directory entries, must request exclusive use of the volume before making modifications to the structures. Windows 95 provides a set of input and output control (IOCTL) functions to manage exclusive volume use. Exclusive use prevents applications from inadvertently changing the file system while a disk utility is trying modify it.
Virtual machine services let Microsoft MS-DOS – based applications take advantage of features provided by Windows 95 when the applications run in a window. MS-DOS – based applications can retrieve and, optionally, set the title of the window in which they run. Virtual machine services also allow MS-DOS – based applications to periodically check the state of an internal close flag and terminate if the flag is set. Windows 95 sets this flag when the user chooses the Close command from the system menu of the window in which the MS-DOS – based application runs. Close-aware applications enable the Close command, which gives the user an alternate way to exit the application and close the window. For more information, see Virtual Machine Services.