Problems with 16bit apps in Windows NT?Here are some reasons for having problems with 16bit applications:
1. The PATH variable is too long or has an entry pointing to the WINDOWS or WINDOW/SYSTEM directories of a Windows 3.x or Windows 95 installation. This would be in either Control Panel / System / Environment or the AUTOEXEC.BAT. See tip 021.
2. The COMMAND.COM used by Windows NT is missing, damaged or replaced by another version. Repair System files and re-apply your latest Service Pack.
3. The VER.DLL file in the %systemroot%\system or %systemroot%\system32 directories is corrupted or replaced by an invalid version.
4. SHARE.EXE (or VSHARE) is being loaded in an %systemroot%\system32\AUTOEXEC.NT.
5. Insufficent environment space, see tip 047.
6. Check %systemroot%\system32\CONFIG.NT, here is mine:
7. Corruption of the WOW sub-system files. Repair System files and re-apply your latest Service Pack.8. Make sure the following files are from your latest SP or NT CD, whichever is later:
Troubleshooting NTVDM and WOW startup problems.In tip 0151, tip 1238, and tip 1227, we described possible causes of 16-bit application troubles.
Additional troubleshooting steps you can take to resolve these problems are:
1. Run %SystemRoot%\System32\Sysedit.exe. If this application starts correctly, both NTVDM and WOW are functioning correctly.
2. If %SystemRoot%\System32\Sysedit.exe does not start correctly, at a CMD prompt, type command.com. If command.com does not start correctly, see step 5. If command.com starts, type Edit.com. If Edit.com does not start correctly, see step 5.
3. If your DOS program requires EMS memory, see Q99279 and upgrade to SP5 (or greater).
4. If your program reuires additional conventional memory, see Q99363.
5. Verify your SystemRoot%\Win.ini and SystemRoot%\System.ini are correct or expand them from the CD-ROM.
6. If you make any changes, use Task Manager / Processes to kill NTVDM and start at step 1.
7. Check your environment variables by typing SET at a CMD prompt.
8. The last step is to run a repair, repairing files. Then re-apply your latest service pack.
How does Windows NT locate .DLL files?Windows NT uses different approaches for 32-bit versus 16-bit apps.
For 32-bit apps, Windows NT searches for implicitly loaded DLLs at:
The .exe file directory.
If the DLL is listed as a KnownDLLs at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager as a type REG_SZ entry with a Value Name of the DLL without the extension and a data value of the DLL with the .DLL extension, then the search is:
The %SystemRoot%\SYSTEM32 directory.
The KnownDLLs are mapped at boot time. Rernaming or moving during a session has no effect.
You can alter this behavior by including the 8.3 DLL name in the ExcludeFromKnownDlls entry, a type REG_MULTI_SZ value, one per line. This will make NT believe that the DLL is not listed in KnownDLLs.
For 16-bit apps, Windows NT uses KnownDLLs for both implicitly and explicitly load DLLs. The value is at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\WOW. At this key, KnownDLLs is a type REG_SZ value which lists the 8.3 DLL names, seperated by spaces. Wihout a KnownDLLs entry, WOW searches:
The current directory.
With the KnownDLLs entry, WOW only searches the %SystemRoot%\SYSTEM32 directory.
You can't run an applications setup?Many setup programs are 16-bit programs.
Use Regedt32 to navigate to:
If a file listed in KnownDLLs is missing from the %SystemRoot%\System32 folder, either extract it from the CD-ROM (expand), from your latest service pack (ServicePackFileName.exe /x), or copy it from another Windows NT that is running your service pack level.
NOTE: You may want to use Registry / Print Subtree to get a list of the KnownDLLs.
Sample: expand <CD-ROM:>\i386\system.dr_ %SystemRoot%\System32\system.drv
You MUST reboot your Windows NT computer.
NOTE: If you used the Windows NT CD-ROM, you MUST reapply your latest service pack.
NOTE: You should also verify that Wowexec.exe and Gdi.exe exists in the %SystemRoot%\System32 folder.
16-bit app hangs and NTVDM consumes 100% of the CPU?If this is your problems, the path is too long.
In additions to the steps decribed in tip 0151:
1. You must have at least RX permissions on %SystemRoot%\System32 and it's sub-folders.
2. Shorten the path, if any, in AUTOEXEC.NT.
3. Terminate NTVDM using Task Manager / Processes