X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fhelp.c;h=d10f9ab9d0d3562662d1729936383f0179cfde76;hb=c9602f20e9cee39ec2a7dddee3e2c12719c25ef0;hp=a8cebd64a6d68090d578e1e0ccec50423caa8f02;hpb=9370698c82696695f0bcd0327a8b5c3703d3eea7;p=xboard.git diff --git a/winboard/help.c b/winboard/help.c index a8cebd6..d10f9ab 100644 --- a/winboard/help.c +++ b/winboard/help.c @@ -24,6 +24,7 @@ #include #include +#include "help.h" FILE *debugFP; @@ -62,7 +63,7 @@ HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD_PTR data ) sprintf(buf, "Hh.exe %s", helpFile); // ignore the other parameters; just start the viewer with the help file - return CreateProcess(NULL, + if( CreateProcess(NULL, buf, /* command line */ NULL, /* process security attributes */ NULL, /* primary thread security attrs */ @@ -71,7 +72,8 @@ HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD_PTR data ) NULL, /* use parent's environment */ NULL, &siStartInfo, /* STARTUPINFO pointer */ - &helpProcInfo); /* receives PROCESS_INFORMATION */ + &helpProcInfo) /* receives PROCESS_INFORMATION */ + ) return hwnd; else return NULL; } //HWND WINAPI @@ -81,13 +83,13 @@ MyHelp(HWND hwnd, LPSTR helpFile, UINT action, DWORD_PTR data) static int status = 0; FILE *f; - if(status < 0) return NULL; + if(status < 0) return 0; if(!status) { f = fopen(helpFile, "r"); if(f == NULL) { status = -1; - return NULL; + return 0; } status = 1; fclose(f);