UnLoadHtmlHelp
Unloads the HTML Help library.
function UnLoadHtmlHelp: Boolean
Closes all help windows opened by the application and unloads the HTML Help library. If the library wasnt loaded the function simply returns. This function is called automatically in the modules finalization section but you can call it at any time to manually unload the HTML Help library. If the function succeeds it returns True otherwise it returns False. After calling this function the HtmlHelp function variable is reset to nil and you will no longer be able to use it independent of the function result. Also, HtmlHelpLoaded will return False no matter whether the unload succeeded or not. Note that this function is only available when both HTMLHELP_DYNAMIC_LINK and HTMLHELP_DYNAMIC_LINK_EXPLICIT are defined.
function UnLoadHtmlHelp: Boolean;
begin
Result := True;
if HtmlHelpLoaded then
begin
if Assigned(HtmlHelp) then
HtmlHelp(0, nil, HH_CLOSE_ALL, 0);
Result := FreeLibrary(HtmlHelpLib);
HtmlHelpLib := 0;
@HtmlHelpA := nil;
@HtmlHelpW := nil;
@HtmlHelp := nil;
end;
end;