Windows Help provides DLL authors with access to 16 of its internal functions. These functions perform operations in the internal .HLP file system, get global information about the currently open Help file, or display information in a standard Windows Help dialog box. They are documented in the DLL.H header file.
In this section, you’ll learn how to access six of these internal functions. An overview of the mechanism is as follows:
1.nWindows Help sends a DW_WHATMSG message to the DLL.
2.nThe LDLLHandler function in the DLL processes the DW_WHATMSG message by returning a DC_CALLBACKS flag.
3.nWindows Help sends a DW_CALLBACKS message specifying a pointer to an array of Windows Help internal functions.
4.nThe LDLLHandler function uses the pointer passed in the DW_CALLBACKS message to obtain pointers to the Windows Help functions it will use.
The ExportBag function in the DLLDEMO.C sample file is used for the examples in this section. ExportBag copies a file from the .HPJ internal file system to an
MS-DOS file. (The file from the .HPJ file system is initially stored using an entry in the [BAGGAGE] section of the DLLDEMO.HPJ project file.) You can use the mechanism illustrated in this example to access files stored in any .HLP file system.