]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winhelp.c
Pageant and PuTTYgen About boxes: add the website button.
[PuTTY.git] / windows / winhelp.c
index 078b724efc8f2d3efa861ca4fd6fff97687c80f1..47539e539f9670cac3f0189ba2747b9ff8c0a196 100644 (file)
@@ -55,9 +55,10 @@ void init_help(void)
     } else
        chm_path = NULL;
     if (chm_path) {
-       HINSTANCE dllHH = LoadLibrary("hhctrl.ocx");
+       HINSTANCE dllHH = load_system32_dll("hhctrl.ocx");
        GET_WINDOWS_FUNCTION(dllHH, HtmlHelpA);
        if (!p_HtmlHelpA) {
+            sfree(chm_path);
            chm_path = NULL;
            if (dllHH)
                FreeLibrary(dllHH);
@@ -81,7 +82,7 @@ int has_help(void)
      * unrealistic, since even Vista will have it if the user
      * specifically downloads it.
      */
-    return (help_path
+    return (help_path != NULL
 #ifndef NO_HTMLHELP
            || chm_path
 #endif /* NO_HTMLHELP */
@@ -105,7 +106,7 @@ void launch_help(HWND hwnd, const char *topic)
 #endif /* NO_HTMLHELP */
        if (help_path) {
            char *cmd = dupprintf("JI(`',`%.*s')", colonpos, topic);
-           WinHelp(hwnd, help_path, HELP_COMMAND, (DWORD)cmd);
+           WinHelp(hwnd, help_path, HELP_COMMAND, (ULONG_PTR)cmd);
            sfree(cmd);
        }
     } else {