About Structures

The HTML Help API provides several objects that you work with using data structures.

When working with a structure, it is recommended that you use a Win32 function such as ZeroMemory, memcpy, or memset to clear out the address space of a structure that has been declared. This ensures that you start with a known quantity before making any modifications. For example, the following code fragment uses memset to make a copy of an HH_WINTYPE structure:

HH_WINTYPE hhWinType;                   //Create new wintype.
            HH_WINTYPE *phhWinType;      //Create a pointer to this wintype.
            memset(phhWinType,           //Requires "memory.h" header be included in the calling application.
                  0,
                  sizeof(HH_WINTYPE));
            HtmlHelp(hwnd,
                    "c:\\help\\MyHelpFile.chm>main",
                    HH_GET_WIN_TYPE,
                    (DWORD)&phhWinType);
            hhWinType = *phhWinType;    //Create a copy so we don't write directly.

Note

The Win32 functions such as ZeroMemory,memcpy, or memset do not make a deep copy of the structure. Developer-written copy constructors perform proper deep copies for OOP/C++ classes and objects.

 

Structures quick reference

Category Structure
Window types
  • [HH_POPUP](/previous-versions/windows/desktop/api/HtmlHelp/ns-htmlhelp-taghh_popup)
  • [HH_WINTYPE](/previous-versions/windows/desktop/api/HtmlHelp/ns-htmlhelp-taghh_wintype)
ALink name/KLink keyword lookups
  • [HH_AKLINK](/previous-versions/windows/desktop/api/HtmlHelp/ns-htmlhelp-taghh_aklink)
Notification messages
  • [HHN_NOTIFY](/previous-versions/windows/desktop/api/HtmlHelp/ns-htmlhelp-taghhn_notify)
  • [HHNTRACK](/previous-versions/windows/desktop/api/HtmlHelp/ns-htmlhelp-taghhntrack)
Full-text search
  • [HH_FTS_QUERY](/previous-versions/windows/desktop/api/HtmlHelp/ns-htmlhelp-taghh_fts_query)
Error tracking
  • [HH_LAST_ERROR](hh-last-error-structure.md)

 

About the HTML Help API