2.4. Running 16-Bit Windows Applications

The 16-bit Windows applications were originally designed to run under Windows 3.x. Some of these applications look for specific components in the OS to function properly. To support 16-bit Windows application, Windows emulates the 16-bit Windows environment called Windows on Windows. (You can read about WoW earlier in this chapter.) The way in which this emulation is performed represents one of the big differences between versions of Windows.

The 16-bit Windows applications are single-threaded applications that actually share a single unit of execution with the 16-bit Windows environment. This is what I referred to earlier in the chapter as cooperative multitasking. The entire 16-bit Windows environment executes via a single processor thread. This thread is then shared among all 16-bit Windows applications running in the 16-bit Windows environment.

The 16-bit Windows programming code is nonreentrant, which means that each section of code can be executed only once (or by one application) at any given time. When one application starts executing a section of code, it sets a flag — the Win16Mutex — on that code. While the flag sets on the code, no other application can execute or enter that code. This is done to prevent multiple applications from executing the same section of code, thereby causing system-wide problems. One of the problems caused by the Win16Mutex flag is that any other program that wants to execute that section of code must ...

Get CompTIA A+® Certification All-In-One For Dummies®, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.