The ICustomHelpViewer provides four functions that can be used to communicate system information with the Help Manager:
- GetViewerName
- NotifyID
- ShutDown
- SoftShutDown
The Help Manager calls through these functions in the following circumstances:
- ICustomHelpViewer.GetViewerName : String is called when the Help Manager wants to know the name of the viewer (for example, if the application is asked to display a list of all registered viewers). This information is returned via a string, and is required to be logically static (that is, it cannot change during the operation of the application). Multibyte character sets are not supported.
- ICustomHelpViewer.NotifyID(const ViewerID: Integer) is called immediately following registration to provide the viewer with a unique cookie that identifies it. This information must be stored off for later use; if the viewer shuts down on its own (as opposed to in response to a notification from the Help Manager), it must provide the Help Manager with the identifying cookie so that the Help Manager can release all references to the viewer. (Failing to provide the cookie, or providing the wrong one, causes the Help Manager to potentially release references to the wrong viewer.)
- ICustomHelpViewer.ShutDown is called by the Help Manager to notify the Help viewer that the Manager is shutting down and that any resources the Help viewer has allocated should be freed. It is recommended that all resource freeing be delegated to this method.
- ICustomHelpViewer.SoftShutDown is called by the Help Manager to ask the Help viewer to close any externally visible manifestations of the Help system (for example, windows displaying Help information) without unloading the viewer.