How Help Locates .DLLs

When executing custom DLLs, Windows Help loads the DLL only when it is needed by the Help file. To load a DLL, Help must be able to find it on the user’s system. When preparing to use a DLL, Help looks in the following locations:

1.nHelp’s current directory.

2.nThe MS-DOS current directory.

3.nThe user’s Windows directory.

4.nThe Windows SYSTEM directory.

5.nThe directory containing WINHELP.EXE.

6.nThe directories listed in the user’s PATH environment variable.

7.nThe directories specified in WINHELP.INI.

If Help cannot find the DLL after searching in all these locations, it displays an error message.

To increase the likelihood that Help will locate the DLL quickly, you should also observe the following guidelines:

nUse unique names for all DLLs accessed by the Help file.

nWhen installing your application on a user’s hard disk drive, your setup program should copy all custom DLLs to the directory where Help is located.

nIf your product is distributed on CD-ROM, copy WINHELP.EXE and any custom DLLs to the user’s hard disk drive.

nDefine a WINHELP.INI entry for each custom DLL that your Help file is using so that Help knows where to locate them.

For an explanation of the WINHELP.INI file, see the “Creating Links Between Help Files” section in Chapter 8, “Creating Links and Hot Spots.”