Configuring the Windows 3.x Environment


Windows XP runs Windows 3.x programs without a hitch thanks to its "Windows-on-Windows" or WOW system that lets these older Windows programs see the 16-bit Windows operating system environment that they expect. WOW in turn depends on the Virtual DOS Machine to provide emulated hardware support. This sounds complex, and it is, but from the user's point of view, you can just run an older Windows application and it just plain works.

One significant thing that WOW does is monitor the old configuration files WIN.INI and SYSTEM.INI. Old Windows programs expect to see Windows's system settings in these files in the Windows directory. Windows XP therefore keeps copies of these files up-to-date with your system's current settings. It also tries to detect changes made to these old configuration files made by legacy programs which are attempting to signal Windows to make changes.

One thing that WOW can't completely fix is the filename length limitation that hearkens back to DOS.

If you run DOS or Windows 3.x applications on Windows XP, you'll see truncated file and folder names in any program that looks at the hard disk directory. You see these shortened names because Windows 3.x applications were hostage to the limitation of DOS's 8.3 file-naming conventions. This limitation can be annoying, especially in a Browse box, but there's absolutely nothing you can do about it, short of upgrading to a 32-bit Windows version of the program.

If you can't upgrade, at least understanding how the truncated names are generated helps a bit. Following are some of the rules governing truncated NTFS and DOS file-naming rules and some hints for using them.

First, consider the rules of Windows 9x, NT 4, Windows 2000, and Windows XP long filenames:

  • Files and directory names can be up to 256 characters in length.

  • You can include a file type or extension, separated from the rest of the name by a period, such as 2002 Sales Reports.WKS. (If associated file extensions are hidden via the Folder Options, the extension is invisible in listings, however.) Windows XP doesn't care how many periods are in a name, and only considers the last one when looking for the file type: Sales.Reports.xls and Salesreports.xls are both taken to be Excel files.

  • Special characters not allowed are as follows:

    ?, ", \, /, <, >, *, |, and :

  • Spaces can be included. No problem.

  • Uppercase and lowercase are both allowed, and they appear in listings. However, they aren't interpreted by Windows XP or its applications as being different from one another. In other words, you can't store a file called mybudget.xls and another one called MYBUDGET.XLS in the same folder, because Windows XP interprets both files as having the same name. If you tried to copy or move one file into the folder containing the other file, you would be asked if you wanted to replace the original file.

Windows XP automatically generates shorter DOS-compatible filenames when needed by a Windows 3.x program by doing the following:

  • Removing illegal characters and replacing them with _ (an underscore).

  • Removing any spaces in the name.

  • Using only the last period that has three consecutive letters after it as the extension.

  • Truncating the first name to six letters and adding a tilde (~) and a single-digit number as the last two characters of the first name; the digit is chosen to make the name distinct from other similar filenames. Consider these examples:

Windows XP Name

DOS/Windows 3.x Name

Quarterly Sales Reports.WK3

QUARTE~1.WK3

Quarterly Sales Reports. Atlanta.Georgia.WK3

QUARTE~2.WK3

Qrtr[Sales]Reports from Atlanta,Georgia.WK3

QRTR_S~1.WK3


When you use any programs that generate documents you're going to use with DOS and Windows 3.x applications, you might want to adopt a naming convention that makes sense to you when the longer names are converted to shorter DOS names. Try to use only one period, and use the extension that the application expects. Because the first six letters are retained, pack as much description into them as possible. And if if you stick to filenames of eight letters or less, plus a three character extension, they'll most likely look identical under the Windows 3.x and DOS applications.

Allotting Independent Memory Space for Windows 3.x Applications

Windows XP creates a separate instance of the virtual DOS machine (VDM) program for each MS-DOS program that you run, but normally all 16-bit Windows 3.x applications are run by one VDM. This is necessary because the old Windows depended on being able to directly transfer data back and forth between programs (or between multiple instances of the same program) by means of shared access to blocks of memory, in ways that modern Windows programs aren't allowed (again, for reliability's sake). The result is that, just like in a real Windows 3.x machine, a Windows 3.x application that crashes can take down the whole VDM, crashing any other Windows 3.x programs (but not, thankfully, Windows XP itself).

Well, unlike death and ta XEs, this isn't necessarily a fact of life. If you don't need your Windows 3.x applications to communicate with each other, you can cause an application to request its own VDM. The memory space that it runs in is then totally isolated, protected from other applications that might run amok. The upside is that one errant Windows 3.x application can't take down another. The downside is that any Windows 3.x applications running in their own memory spaces can't communicate with other Windows 3.x applications as they would in a true Windows 3.x computer. Dynamic Data Exchange (DDE) and services provided by shared Dynamic Link Libraries (DLLs) will not work, thus data- passing between applications is quashed. However, this isn't a big problem for most Windows XP users, because you'll probably seldom use more than one or two Windows 3.x applications at once anyway.

You make the setting to the properties for the Windows 3.x program. As an example, I'll use a Windows 3.x version of the popular Pretty Good Solitaire shareware program. To change the setting, follow these steps:

1.

Create a shortcut for the program in question; to make a shortcut, right-click the program icon in Windows Explorer and select Create Shortcut.

2.

Right-click the shortcut, and choose Properties. In the Shortcut Properties dialog box, choose the Shortcut tab, and then click Advanced. You then see the dialog box shown in Figure 25.12.

Figure 25.12. You can set this option to give a Windows 3.x application its own memory space. You can do so only from a shortcut for the application.


TIP

Many Windows 3.x programs were developed for 256-color displays, and might not function properly with the 65, 536, or 16.8 million color displays now used by Windows. If necessary, you can also use the Compatibility tab to select 256-color or other display settings, or to choose compatibility mode settings described earlier in this chapter in "Program Compatibility Wizard."


From this dialog box, you have only to put a check in the Run in Separate Memory Space check box.

The other option, Run with Different Credentials, allows you to select which user name should be used to run the program. This is useful if a program was installed by a particular user, not by the system administrator, but you want all users of the computer to be able to run the program. Select the user who installed the program when prompted by the system.



Special Edition Using Microsoft Windows XP Professional
Special Edition Using Microsoft Windows XP Professional (3rd Edition)
ISBN: 0789732807
EAN: 2147483647
Year: 2003
Pages: 450

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net