\r
FILE *debugFP;\r
\r
-int\r
-HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD data )\r
+HWND WINAPI\r
+HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD_PTR data )\r
{\r
PROCESS_INFORMATION helpProcInfo;\r
STARTUPINFO siStartInfo;\r
static int status = 0;\r
FILE *f;\r
\r
- if(status < 0) return 0;\r
+ if(status < 0) return NULL;\r
\r
if(!status) {\r
f = fopen(helpFile, "r");\r
if(f == NULL) {\r
status = -1;\r
- return 0;\r
+ return NULL;\r
}\r
status = 1;\r
fclose(f);\r
sprintf(buf, "Hh.exe %s", helpFile);\r
\r
// ignore the other parameters; just start the viewer with the help file\r
- return CreateProcess(NULL,\r
+ if( CreateProcess(NULL,\r
buf, /* command line */\r
NULL, /* process security attributes */\r
NULL, /* primary thread security attrs */\r
NULL, /* use parent's environment */\r
NULL,\r
&siStartInfo, /* STARTUPINFO pointer */\r
- &helpProcInfo); /* receives PROCESS_INFORMATION */\r
+ &helpProcInfo) /* receives PROCESS_INFORMATION */\r
+ ) return hwnd; else return NULL;\r
}\r
\r
//HWND WINAPI\r
int\r
-MyHelp(HWND hwnd, LPSTR helpFile, UINT action, DWORD data)\r
+MyHelp(HWND hwnd, LPSTR helpFile, UINT action, DWORD_PTR data)\r
{\r
static int status = 0;\r
FILE *f;\r
void AnimateAtomicCapture(int fromX, int fromY, int toX, int toY, int nFrames);\r
void DisplayMove P((int moveNumber));\r
Boolean ParseFEN P((Board board, int *blackPlaysFirst, char *fen));\r
-int HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD data );\r
+#ifdef VISTA\r
+#include "htmlhelp.h"\r
+#else\r
+HWND WINAPI HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD_PTR data );\r
+#endif\r
\r
typedef struct {\r
ChessSquare piece; \r
\r
case IDM_HELPCONTENTS:\r
if (!MyHelp (hwnd, "winboard.hlp", HELP_KEY,(DWORD)(LPSTR)"CONTENTS") &&\r
- !HtmlHelp(hwnd, "winboard.chm", 0, 0)) {\r
+ !HtmlHelp(hwnd, "winboard.chm", 0, 0) ) {\r
MessageBox (GetFocus(),\r
"Unable to activate help",\r
szAppName, MB_SYSTEMMODAL|MB_OK|MB_ICONHAND);\r