Using WinHelp 4.0 In Win32s

This FAQ file is intended to put in one place the information I have gathered on using WinHelp 4.0 under Windows 3.1 with Win32s. This file is accurate to the best of my knowledge, but I make no guarantees. I will try to keep it updated as I receive new information.

Terminology Used

Distributing Win32s

Setup and Behavior

Compiler Compatibility

Support

Send any questions, comments, corrections, or additions to .

If I don't know the answer, I will try to get one and then add it to this file.

Go back to the top of this document


Terminology Used

I have tried to distinguish between the WinHelp file versions and the engines.

Is everyone confused yet?

If you find where I misused terminology, please let me know.

Go back to the top of this document


Getting Win32s Files

All of the necessary files are on the current MSDN level 2 CDs.

Go back to the top of this document


Installing Win32s

Run SETUP from the <CD>:\WIN32SDK\MSTOOLS\WIN32S\DISKS\RETAIL\WIN32S\DISK1 directory. If you also want the latest versions of the OLE files, run SETUP from the <CD>:\WIN32SDK\MSTOOLS\WIN32S\DISKS\RETAIL\OLE32S\DISK1 directory (from Michael Malcolm Anderson)

Go back to the top of this document


Distribution Files for Win32s

The following is taken directly from \WIN32SDK\DOC\REDIST\REDIST.TXT on the MS Development Platform Premium Release titled "Windows 95 Final Rlease."

Win32s Version 1.30 Redistributable Code

The Win32s Redistributables are located in several directories of the Win32 SDK distribution CD-ROM. The Win32s files must be installed on Microsoft Windows 3.1 or Microsoft Windows for Workgroups in order to run Win32 applications. It is necessary to ship these components with, and be installed by, your application.

In addition to the rights granted in Section 1 of the Development License Agreement ("Agreement"), with respect to the Win32s Redistributable Code, you have the following non-exclusive, royalty free rights subject to the Distribution Requirements detailed in Section 1 of the Agreement:

Go back to the top of this document


Easy Win32s distribution

Copy the disk images in the <CD>:\WIN32SDK\MSTOOLS\WIN32S\DISKS\RETAIL\WIN32S\DISK1 and . . .\DISK2 directories and call SETUP.EXE on disk 1 from your setup routine to do the Win32s setup for you.

If your application is an OLE application copy the disk images in the <CD>:\WIN32SDK\MSTOOLS\WIN32S\DISKS\RETAIL\OLE32S\DISK1, . . .\DISK2, and . . .DISK3 directories and call SETUP.EXE on disk 1 from your setup routine to do the Win32s setup for you.

Go back to the top of this document


Can I open a WinHelp 4.0 file from 16-bit software under Win32s?

Only if you use the Shell command to start WINHLP32.EXE and pass the file name as a parameter.

Since you cannot have context sensitive help this way, it's probably better to call the WinHelp API which will automatically call WINHELP.EXE from 16-bit software. If you want WinHelp 4.0 functionality you will need to get any extensions (collapsible contents windows, print-all routines, etc.) as 16-bit DLLs or apps.

Author's note: You can get context sensitive help from a WinHelp 4.0 file under Win32s if you are calling it from 32-bit software.

Go back to the top of this document


Can I get context sensitive help in Win32s if I use WinHelp 4.0?

Yes, if you use one of the following combinations:

In general it's safer not to mix 16-bit and 32-bit components. Use WinHelp 3.1 files if your application is 16-bit and WinHelp 4.0 files with only 32-bit DLLs if your application is 32-bit. If you are using WinHelp 4.0 files in Win32s and want the user to be able to double-click on the file to open them, you should name them with an extension other than .HLP (I'm using .H32) and associate this extension with WINHLP32.EXE (see below).

Author's note: I have tried to trick the system by declaring the 32-bit API call (WinHelpA) in a 16-bit application (Yes, I remembered to copy the appropriate Windows 95 DLL to my Windows/System directory). This doesn't work either, so don't waste your time trying.

Go back to the top of this document


How do I get 32-bit software to call WINHLP32.EXE under Win32s?

Don't do anything. Once Win32s is installed, 16-bit software calls to the WinHelp API will call WINHELP.EXE while 32-bit software calls to the WinHelp API will call WINHLP32.EXE.

Go back to the top of this document


Can I call WINHLP32.EXE if my help file uses 16-bit DLLs under Win32s?

No. You will get an error message telling you that the help file uses a 16-bit DLL and that WINHELP.EXE (the WinHelp 3.1 engine) will be used to open the file. Although 32-bit software with 16-bit DLLs will work correctly under Windows 95, it will not work correctly under Win32s.

Go back to the top of this document


How can I make sure that WINHLP32.EXE is called when I double-click on my help file.

There are at least two ways to do this:

  1. Name your help file with a ".H32" extension (or any other extension that is not already spoken for). Once you have Win32s on your system, add "h32=winhlp32.exe ^.h32" in the [Extensions] section of the WIN.INI file.
    The setup routine programmer must associate WINHLP32.EXE with the .H32 extension during setup (in Win32s, Windows 95, or both, depending on the system). The application developers need to make sure that the name of the application help file is changed. In Visual C++ with Microsoft Foundation Classes, this can be done by adding "m_pszHelpFilePath = helpPathFileName;" to the InitInstance member function of the App class created for the app. This changes the help file name from the default AppName + .HLP to helpPathFileName. When creating helpPathFileName you must make sure that all backslashes are double backslashes.
    If you use this method, your help file does not have a .HLP extension, and therefore may not be recognized by someone trying to double-click the file name to get help. However, 16-bit and 32-bit help files are handled separately and intelligently by the system. In Windows 95, you can set the file association so that the new file extension shows the help "book" as its icon, just like a standard .HLP file.
    Note: You can use a .HLP extension in Windows 95 and a .H32 extension in Win32s if you want. This requires a little more programming (emphasis on little), since both the app and the installation routine need to know which environment they are in. It also causes the least possible disruption, since everything is as expected in Windows 95, and in Win32s the only difference from normal for users appears if they go hunting to open the help file by double-clicking.
  2. Once you have Win32s on your system, change the ".HLP" entry in the [Extensions] section of your WIN.INI file from "hlp=winhelp.exe ^.hlp" to "hlp=winhlp32.exe ^.hlp." This changes the WinHelp engine used if you "execute" a help file directly (e.g., by double-clicking in file manager) or if it is called from a 32-bit application.
    Double-clicking a .HLP file does the following:

Go back to the top of this document


What are the known bugs in the current version of WinHelp 4.0 running under Win32s?

Go back to the top of this document


When should I move to WinHelp 4.0?

Go back to the top of this document


Can I use the new WinHelp 4.0 tools under Win32s?

Version 4.00 of hcw.exe and hcrtf.exe should run OK on Win32s, but because it has not had a test pass, it is not officially supported. Version 4.01 of hcrtf.exe (available this fall) will not run on Win32s if you allow the grinder window to come up. Version 4.02 of hcw.exe (early next year) will not run at all on Win32s. (from Faith Sohl, Microsoft)

Note from author: I have not been able to get any version of hcw.exe or hcrtf.exe to work on my system under Win32s. Other people have reported success in using the 4.00 version of these files. However, if you have Windows 95, you can do all editing and compiling under Windows 95 and only test under Win32s (see below).

Go back to the top of this document


Can I compile with versions of hcw.exe and hcrtf.exe later than 4.00 and still have a help file that runs on Win32s?

There is no code in hcw/hcrtf for recognizing that it is running on Win32s. It always creates a version 4.0 help file, which requires WINHLP32.EXE to display. WINHLP32.EXE is available on NT 3.51, Windows 95, and Win32s 1.3. It makes no difference whether the help file was compiled on any of these platforms. (from Faith Sohl, Microsoft)

Author's note: The WINHLP32.EXE shipped with Windows 95 is different from the WINHELP.EXE shipped with Win32s. make sure you keep track of which platform your WINHELP.EXE belongs to.

Go back to the top of this document


How will WIN32HLP.EXE under Win32s be updated?

Microsoft has no current plans to ever revise the Win32s version of WinHelp. (from Faith Sohl, Microsoft)

Go back to the top of this document


How Will Bugs get fixed?

The only bugs in the Win32s version of WINHLP32.EXE that Microsoft will consider fixing are ones that are reproducible on NT or Windows 95. If you find bugs not listed that meet the criteria, send them on to Microsoft. (from Faith Sohl, Microsoft)

Go back to the top of this document


Copyright 1995-1998 by Don Lammers.
Last content update 1996-02-09. Reformatted 1998-05-01.
Shadow Mountain Tech Home Page | References