Make Stability the Default for Win16 Apps Under NT 4.0

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

platlogo

Windows Tips & Secrets
1998 PLATINUM technology, Inc.

Reprinted with permission from Platinum Technology, Inc.

Even with stable 32-bit operating systems like Windows NT 4.0, whenever you run legacy applications, you effectively step back in time to the days of Windows 3.1x. General protection faults are still a real problem because 16-bit applications share a message queue. With all the legacy programs remaining on the market, you may still have problems with 16-bit applications locking up each other. One way to fix the problem is to run each program in it's own memory space. Up until now you've had to start each program in its own Virtual DOS Machine (VDM) as you loaded it, but we've discovered a way to have every 16-bit application automatically run in its own VDM by default.

There are risks involved with having every 16-bit application run in its own memory space. Each VDM requires more RAM than if it ran in the shared memory space. Of greater consequence is that you lose OLE compliance. You won't be able to embed or link objects between two open programs. If you are using office suites earlier than Office 95, you might have problems. Of course, you can still cut and paste between applications using the clipboard, but you won't be able to use the original program to edit the pasted material. The two programs are unaware of each other's existence.

Another problem is that applications that share DLLs may lock up when one program tries to access a DLL in use by another program. One program locks the file and may cause both applications that are trying to use the same DLL to freeze. The only way for these legacy applications to function is to share a VDM.

Here's how to run applications in their own VDM individually:

  1. Create a shortcut to the 16-bit application.

  2. Right-click the shortcut icon. Select Properties.

  3. Select the Shortcut tab.

  4. Check the Run in Separate Memory Space box. Click OK.

Now every time you open that application it will create a new VDM that contains only that application.

If you want each application to run in its own VDM by default, you will need to edit the Registry. Before you edit the Registry, you should make a backup copy.

  1. Start the Registry Editor (\Winnt\Regedit.exe).

  2. Open HKLM\SYSTEM\CurrentControlSet\Control\WOW.

  3. In the right pane, double-click DefaultSeparateVDM

  4. In Value data change no to yes and click OK.

  5. Close the Registry Editor.

From now on all 16-bit applications will run in their own VDM by default. Try this for awhile. Monitor your system for stability. If this configuration causes problems such as the system hangs we described, then you can always reverse the procedure and go back to the Registry Editor and change the value of DefaultSeparateVDM back to no.

Additional Information

For more information, go to the Platinum Technology, Inc. web site at:
https://www.platinumtechnology.com.

We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.