INFO: Running a Windows-Based Application in its Own VDM

Last reviewed: April 25, 1997
Article ID: Q115235

The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) for Windows NT, versions 3.5, 3.51, 4.0

SUMMARY

Under Windows NT, 16-bit Windows-based applications run as separate threads under a special environment called WOW (Windows on Win32). Under Windows NT version 3.1 and earlier, WOW supports running all 16-bit Windows-based applications in one virtual machine (VM). These applications share an address space, just as they do on Windows. But under Windows NT version 3.5 through 4.0, WOW supports running a Windows-based application in its own VM, which gives the application its own address space.

To programmatically start a Windows-based application in its own VM, start the application with CreateProcess() and then specify the flag CREATE_SEPARATE_WOW_VDM.

To specify a Win16 application started from the command prompt to run in its own address space, use the following syntax:

   start /SEPARATE <filename>

To specify a shortcut in its own address space for a 16-bit application started from the Program Manager, select the "Run in Separate Memory Space" check box in the Shortcut tab of the Properties for the application. For versions of Windows NT previous to 4.0, the same option is available in the Properties for applications in Program Manager.

NOTE: This option is not the default, nor is there any way to make it the default.

MORE INFORMATION

Allowing a 16-bit Windows-based application to run in a separate address space provides for more robust operation, because the application is isolated from other Windows-based applications. However, the downside is twofold:

  • WOW VMs require approximately 2500K of private memory on x86 machines.
  • There is no shared memory between WOW VMs. Therefore, 16-bit Windows- based applications that rely on shared memory cannot be run in separate VMs. As an alternative, use DDE or OLE, because they can be used by an application in one VM to communicate with an application in another VM.


Additional query words: start ntvdm win31 sharing
Keywords : BseProcThrd kbprg Subsys
Version : 3.5 3.51 4.0
Platform : NT WINDOWS
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.