If you are distributing your application and Help files on removable media such as CD-ROM, you can have your setup program define the drives and directories where Help should look for Help files. The paths you define will be added to Help’s regular search paths when performing interfile jumps.
The syntax for the WINHELP.INI entry is:
[FILES]
HLP-filename=drive:\directory-string, message
Parameter | Description |
HLP-filename | The name of the Help file for which you want to define a search path. |
drive | The letter of the drive that contains the Help file. The drive letter must be an alpha character. You can specify as many as 26 drives. |
directory-string | The directories where Help should look for the Help file. The directory string can have as many as 256 characters. |
message | The message that Help should display in a dialog box, prompting the user to insert the correct disk into the designated drive. The message can have as many as 50 characters. |
If the application or setup program creates an invalid entry, Help will display the standard “Help file not found” error message. So, Help authors are encouraged to test the validity of each WINHELP.INI entry.
The following entry tells Help to look in the \PRODUCT\FILES directory of the P drive for the “Cardfile Help” file. If necessary Help will prompt the user to insert the CD into the drive:
[FILES]
CARDFILE.HLP=P:\PRODUCT\FILES, Please insert your Windows version 3.1 CD into drive P:.
When creating entries in the WINHELP.INI file, you must also observe the following guidelines:
nEach entry can be no longer than 512 characters.
nThe first application to create the WINHELP.INI file must also create the [FILES] section heading. You can use use the Windows function WritePrivateProfileString to create entries in the WINHELP.INI file. For more information on this function, see the Windows version 3.1 SDK.