Erich Hoover : hhctrl.ocx: When called as a program, quit when HtmlHelp call fails.
Alexandre Julliard
julliard at winehq.org
Wed Sep 28 14:45:46 CDT 2011
Module: wine
Branch: master
Commit: 4cf842e75ddd77898070c2ebcbb16d82d5716678
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4cf842e75ddd77898070c2ebcbb16d82d5716678
Author: Erich Hoover <ehoover at mines.edu>
Date: Tue Sep 27 20:02:32 2011 -0600
hhctrl.ocx: When called as a program, quit when HtmlHelp call fails.
---
dlls/hhctrl.ocx/hhctrl.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c
index 400f920..7647abb 100644
--- a/dlls/hhctrl.ocx/hhctrl.c
+++ b/dlls/hhctrl.ocx/hhctrl.c
@@ -349,6 +349,7 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
int len, buflen, mapid = -1;
WCHAR *filename;
char *endq = NULL;
+ HWND hwnd;
hh_process = TRUE;
@@ -404,12 +405,18 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
/* Open a specific help topic */
if(mapid != -1)
- HtmlHelpW(GetDesktopWindow(), filename, HH_HELP_CONTEXT, mapid);
+ hwnd = HtmlHelpW(GetDesktopWindow(), filename, HH_HELP_CONTEXT, mapid);
else
- HtmlHelpW(GetDesktopWindow(), filename, HH_DISPLAY_TOPIC, 0);
+ hwnd = HtmlHelpW(GetDesktopWindow(), filename, HH_DISPLAY_TOPIC, 0);
heap_free(filename);
+ if (!hwnd)
+ {
+ ERR("Failed to open HTML Help file '%s'.\n", szCmdLine);
+ return 0;
+ }
+
while (GetMessageW(&msg, 0, 0, 0))
{
TranslateMessage(&msg);
More information about the wine-cvs
mailing list