Microsoft KB Archive/115235

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Q115235



The information in this article applies to:


  • Microsoft Win32 Software Development Kit (SDK), used with:
    • the operating system: Microsoft Windows 2000
    • the operating system: Microsoft Windows NT, versions 3.5, 3.51, 4.0





SUMMARY

Under Windows NT, 16-bit Windows applications run as separate threads a special environment called WOW (Windows on Win32). Windows NT version 3.1 runs all 16-bit Windows applications in one virtual machine (VM) so these applications share an address space, just as they do on Windows. Windows NT versions and later support multiple WOWs so each Windows application can run its own VM, which gives the application its own address space.



MORE INFORMATION

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.

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 computers.
  • 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 sharing unique address space wow

Keywords : kbprogramming kbKernBase kbOSWin2000 kbThread kbDSupport kbGrpDSKernBase
Issue type : kbinfo
Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch


Last Reviewed: October 27, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.