Running a 16-bit Application in Separate Memory Space

Last reviewed: October 16, 1997
Article ID: Q156360
The information in this article applies to:
  • Microsoft Windows NT Workstation versions 3.5, 3.51, and 4.0
  • Microsoft Windows NT Server versions 3.5, 3.51, and 4.0

SUMMARY

When you double-click an icon that is associated with a 16-bit application in File Manager or Windows NT Explorer, it is run in a shared memory space video display metafile (VDM) by default. This article details how to run a 16-bit application in a separate memory space based on its association.

MORE INFORMATION

You must first create a batch file or CMD file. This example will illustrate what you can do to have files associated with the editor WRITE start in separate memory space.

  1. Create a file named Write.cmd or Write.bat. Contents of the file should be:

    @echo off start /separate C:\Directory\Write.exe %1%

    NOTE: You will have to specify the drive letter and directory where the executable file exists, or place the batch file in a directory and add that directory to your path in your environment variables in Windows NT.

    WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

  2. Start Registry Editor (Regedt32.exe) and Edit the registry entry for the file association. Look for the file extension under the following registry key:

          HKEY_LOCAL_MACHINE\SOFTWARE\Classes
    

    Using Write.exe as an example, you would look for ".wri" under this registry key.

  3. Select this entry, and in the right-hand window of Registry Editor, you will see the folder or file type this extension is associated with. For example:

         HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.wri
    

    The right-hand window will display: <No Name> :REG_SZ : wrifile

  4. You will find this folder further down in the Classes subkey. For example:

          HKEY_LOCAL_MACHINE\SOFTWARE\Classes\wrifile
    

    To change the association in the registry, you must change the string located under the following key: (again using Write.exe associations for example)

          HKEY_LOCAL_MACHINE\SOFTWARE\Classes\wrifile\shell\open\command
    

    The value that will appear in the right hand window should be similar to below:

         <No Name> : REG_SZ : Write.exe %1
    

    In Windows NT 4.0 it will look similar to the following:

         <No Name> : REG_SZ : C:\Program Files\Windows NT\
    
                              Accessories\Wordpad.exe "%1"
    
    

  5. Double-click on the value that appears in the right-hand window and edit the string to reflect the new batch file or CMD file association. This will be the batch file you created in step 1.

    After you edit the string, it should appear similar to the entry below:

         <No Name> : REG_SZ : C:\<YourDirectory>\Write.cmd %1
    

    In Windows NT 4.0 it should look like the following:

         <No Name> : REG_SZ : C:\<YourDirectory>\WRITE.CMD "%1"
    

    NOTE: The quotation marks in the Windows NT 4.0 registry setting C:\<YourDirectory>\ reflect the drive and directory structure to where your batch or CMD file exists.


Additional query words: 16-bit separate memory space association file
manager explorer
Keywords : nthowto NTSrvWkst
Version : WinNT:3.5,3.51,4.0
Platform : winnt
Issue type : kbhowto


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: October 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.