Communicating with the Help Manager
Go Up to Help System Interfaces
The System.HelpIntfs.ICustomHelpViewer provides 4 functions that can be used to communicate system information with the Help Manager. The Help Manager calls through these functions in the following circumstances:
- GetViewerName: String--called when the Help Manager wants to know the name of the Help viewer (for example, if the application is asked to display a list of all registered Help viewers). This information is returned through a String return value, and is required to be logically static (that is, it cannot change during the operation of the application).
- NotifyID(const ViewerID: Integer)--called immediately following registration to provide the Help viewer with a unique cookie that identifies it. This information must be stored off for later use; if the Help 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 Help viewer.)
- ShutDown--called by the Help Manager to notify the Help viewer that the Help Manager is shutting down and that any resources the Help viewer has allocated should be freed. We recommend that all resource freeing be delegated to this method.
- SoftShutDown--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.