The information in this article applies to:
SUMMARYIt is extremely difficult for an application to determine in advance how much memory an MS-DOS (non-Windows) application will require to run. This data can be estimated under real and standard modes; however, there is no method to determine this information in enhanced mode. MORE INFORMATIONThe Windows module WinOldAp is required to run MS-DOS-based applications. One complication is that once WinOldAp is in memory, it can run many applications. In the following table, "PIF Req'd" indicates the amount of memory required for the application as listed in the corresponding PIF file and "PIF Des'd" indicates the amount of memory desired by the application as listed in the corresponding PIF file. The following table indicates the difference between applications:
As this table indicates, the second copy of the application costs
almost no memory. This is because the two copies of the application
share the same memory and are swapped in and out of memory (to disk,
to a RAM drive, or to expanded memory, depending on the WIN.INI
settings).
Another factor is the order in which MS-DOS-based applications are loaded. The statistics below demonstrate these differences. In the first case, an 80K program is loaded followed by a 160K program. In the second case, the 160K program is loaded followed by the 80K program: Case 1:
Case 2:
These results are not as unusual as they may appear. In the second
case, the larger application (App #2) is loaded first. This sets the
WinOldAp swapping partition large enough to hold the application. When
the smaller application (App #1) is run, it fits into the existing
partition. In contrast, in the first case, the smaller application is
run first, therefore the swapping area is not set large enough to hold
the larger application. When the larger application is loaded, WinOldAp
must create a completely separate partition to hold it.
The amount of memory needed to run an old application varies, depending on the following:
The handling of this type of problem is addressed by Windows version 3.1. In Windows version 3.1, the TOOLHELP library can be used to retrieve the Exit Code of a Windows-based application. This also works in Windows version 3.0, however, the problem is that WINOLDAP (the MS-DOS-based application's Windows agent) for Windows version 3.0 always exits with exit code 0. Therefore, there is no way to obtain results of the attempted MS-DOS-based application run. The version of WINOLDAP included with Windows version 3.1 will exit with the exit code of the MS-DOS-based application that was run, or one of the following special values:
NOTE THAT THESE SPECIAL CODES MAY OVERLAP WITH AN EXIT CODE USED BY
THE MS-DOS-BASED APPLICATION. If this happens, there is no way to correct
it other than to change the MS-DOS-based application to use different exit
codes that do not conflict with these special ones.
ALSO NOTE: The exit code of a .BAT file run is always 0. This is a property of COMMAND.COM, which is part of MS-DOS. Additional query words: no32bit 3.00 3.10
Keywords : kb16bitonly |
Last Reviewed: November 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |