A dynamic-link library (DLL) is an executable module containing functions that Windows applications (like Viewer) can call in order to perform useful tasks. Viewer provides the following standard DLLs:
DLL | What It Does |
MVAUDDLG.DLL | Displays an audio control panel and plays back waveform-audio files |
MVAUDIO.DLL | Plays back waveform audio files |
MVBMP.DLL | Displays pictures with up to 256 colors |
MVAFF.DLL MMP.DLL | Play back animation sequences |
FTUI.DLL FTENGINE.DLL | Perform full-text searches |
Viewer accesses these DLLs in one of two ways:
Through DLL functions registered as Viewer commands in a title's project file. These functions can then be used in hot spots and command footnotes in a topic files.
Through embedded-window (ew) commands in topic files.
If Viewer's standard DLLs and internal command set (described in Chapter 18, “Multimedia Viewer Commands,”) don't provide all the functionality you need for a title, you can write your own DLLs to add extensions to Viewer. In this chapter, you'll learn two ways to extend the Viewer: by providing custom DLLs containing author-defined Viewer commands and by providing DLL access through embedded-window commands.
DLLs for Viewer must follow all the standard design requirements for DLLs. This chapter assumes that you're familiar with these requirements, which are described in the Microsoft Windows Software Development Kit Guide to Programming.
To create DLLs for Viewer, you need the Microsoft Windows Software Development Kit and the Microsoft C Optimizing Compiler, version 6.0.
Viewer includes source code for sample DLLs to illustrate the concepts presented in this chapter. The source code is contained in the files DLLDEMO.C (for the Viewer-command DLL) and EWDEMO.C (for the embedded-window DLL). Be sure you study these source files and understand how they work before you continue in this chapter, as the remainder of this chapter assumes you are familiar with these files.
You can use this sample code as the template for creating your own DLLs. The Viewer package also includes MAKEFILEs for building the sample DLLs.