PRB: Windows NT 4.0 May Close FoxPro for MS-DOS Application

Last reviewed: November 26, 1997
Article ID: Q168396
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a on the following platform: NT

SYMPTOMS

If a FoxPro 2.6a for MS-DOS application executes a looping program structure, Windows NT 4.0 terminates the FoxPro application without warning. No error message or other information appears on the screen. This happens both to FoxPro for MS-DOS executable files and programs running in the development version of the product. The behavior also occurs on machines upgraded to Service Pack 1 and 2.

RESOLUTION

You must add a new value to the Windows NT 4.0 registry. Under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Wow key, add a new value, DisableVme, by following the steps listed below:

  1. Start Registry Editor (Regedt32) and go to the following subkey:

          HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Wow
    

  2. From the Edit menu, select Add Value.

  3. Enter the following Value name:

          DisableVme
    

  4. In the Add Value dialog box, make sure the Date Type is REG_SZ and click OK.

  5. Enter the following in the String Editor dialog box:

          1
    

  6. Shut down Windows NT, turn off the computer's power and then restart the computer and boot into Windows NT.

Alternatively, you can run the FoxPro 2.6a for MS-DOS program on Windows NT 3.51, Windows 95 or Windows 3.11. This behavior is not seen using FoxPro 2.6a for Windows or Visual FoxPro 3.0, 3.0b, or 5.0 for Windows.

MORE INFORMATION

This problem is most frequently encountered when FoxPro 2.6a for MS-DOS executes a looping program structure. Examples of this are DO WHILE...ENDDO, SCAN...ENDSCAN, and IF...ENDIF statements that place a program in a repetitive cycle. Normally, FoxPro 2.6 for MS-DOS runs normally in all other circumstances. For instance, developing in FoxPro's development environment (interactively with the Command window) or even running a screen with a READ CYCLE does not provoke a shut down. However, if any FoxPro for MS-DOS application unexpectedly shuts down without producing a error message regardless of the activity it is performing, you should consider the problem described in this article as a possible cause.

This behavior is not totally consistent across different machines. Some machines are able to run looping program structures for many hours before the application shuts down. Other machines, however, execute these commands for only a few moments before termination of the FoxPro application.

Steps to Reproduce Behavior

  1. Create a program that contains the following lines of code:

          DO WHILE .T.
    
             ? FILE("C:\Config.aaa")
          ENDDO
    
    

  2. Start FoxPro 2.6a for MS-DOS on a machine running Windows NT Server 4.0.

  3. Run the program. Usually, the NT Server 4.0 shuts down the FoxPro application in less than five minutes. Some machines, however, may take much several hours before terminating the FoxPro application.

While this code example simply executes an indefinite loop while searching for a non-existent file, in essence it duplicates behavior that legitimate programs perform. Often, programs are written to run in the background while passively checking for a file or a condition.
Keywords          : FoxDos FxenvOs winnt kberrmsg
Version           : 2.5 2.5a 2.5b 2.6 2.6a
Platform          : MS-DOS
Issue type        : kbprb


================================================================================


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