A dynamic-link library (DLL) is an executable module containing functions that Windows-based applications (like Windows Help) can call to perform useful tasks. Windows Help accesses DLLs in two ways:
nThrough DLL functions registered as Help macros in a Help Project file. These functions can then be used in hot spots and macro footnotes in topic files.
nThrough embedded window (ew) references in topic files.
If Windows Help’s internal macro set (described in Chapter 15, “Help Macro Reference”) doesn’t provide all the functionality you need for a Help file, you can write your own DLLs to add extensions to Windows Help. In this chapter, you’ll learn two ways to extend Windows Help: by providing custom DLLs containing author-defined Windows Help macros and by providing DLL access through embedded-window references.
When creating DLLs for embedded windows, you must follow all the standard design requirements for Windows DLLs. This section assumes that you’re familiar with these requirements, which are described in Chapter 20, “Dynamic-Link Libraries,” of the Microsoft Windows version 3.1 Software Development Kit (SDK), Guide to Programming manual..
To create DLLs for Windows Help, you need the Microsoft Windows Version 3.1 SDK and the Microsoft C Optimizing Compiler, version 6.0 or greater, or Microsoft Quick C for Windows version 1.0.
Included with this Authoring Guide is the source code for a sample DLL and a MAKEFILE for building the sample DLL. The source code is contained in the files DLLDEMO.C (for the Help macro DLL) and EWDEMO.C (for the embedded window DLL). You can use this sample code as a template for creating your own DLL. Be sure you study these source files and understand how they work before you continue in this chapter, since the sample DLL illustrates the concepts presented in this chapter and the remainder of this chapter assumes you are familiar with these files.