If you create a DLL for use with Windows Help, you can identify the functions within the DLL. The RegisterRoutine macro gives you the power to extend Windows Help using your own DLLs. After you register a DLL function with Windows Help, you can create menu items or macro buttons that execute the function. In this way, you can offer specialized capabilities that are not offered in the standard Windows Help application and make them available to users of your Help file.
When registering a DLL function, you provide Help the following information:
nDLL filename
nFunction name
nData type returned by the function
nNumber and type of function parameters
To register the DLL function, you enter a RegisterRoutine macro in the [CONFIG] section of the Help project file. (If you don’t register the DLL function in the [CONFIG] section, you must register it another way before using the function.) The RegisterRoutine macros are executed when the Help file is opened, so the registered functions are available during the entire Help session. You must register a DLL routine before using it, or the Help compiler will report an error when it encounters the unregistered macro in the RTF source files and the macro will not work when executed in the built Help file.
The RegisterRoutine macro has the following syntax:
RegisterRoutine("DLL-name", "function-name", "parameter-spec")
Parameter | Description |
DLL-name | String specifying the name of the DLL in which the function resides. The filename must be enclosed in quotation marks. You can omit the .DLL filename extension.
Specify the directory only if necessary. Generally, DLLs are installed in the directory where Windows Help resides. For more information, see the following section. |
function-name | String specifying the name of the function to use as a Help macro. The function name must be enclosed in quotation marks. |
parameter-spec | String specifying the formats of parameters passed to the function. Characters in the string represent C parameter types. |
For complete information on the RegisterRoutine macro, see Chapter 15, “Help Macro Reference.”