h.g. muller wrote:
At 20:19 11-7-2009 -0600, Eric Mullins wrote:
Aside from warnings, one reason for my patch was to allow this to
compile in MSVC 6.x and 4.1.
OK, I overlooked something. I first made the HTML patch using the
htmHelp.h and htmlHelp.lib
provided by the Html Help Workshop. But when I found out that you only
have to call a Hh.exe
I thought it would be better to make the compile inot dependent on
this, and provide my own
code to do it. I did want to keep the originl data type for
HtmlHelp(), though, becase in
future versions of Windows HtmlHelp might be so standard that it gets
defined in windows.h
like WinHelp() apparently is now, and then we could simply switch back
to it by deleting
my code for HtmlHelp.
The htmlhelp.h did contain the definition with DWORD_PTR, and since it
did not raise any
complaints from the compiler I assumed it was a standard Windows type,
but what I overooked
was that it was redefined it earlier in the file:
// Defines for Win64
#ifndef _WIN64
#define DWORD_PTR DWORD
#endif
I submitted another patch to deal with this because I agree with Tim
that because of 64 bit issues, the DWORD_PTR type ought to remain
intact. Note: right now, only 0/NULL is used for this argument anyway.
I found that exact fragment online, but didn't want to copy Microsoft
code. However, if you like that solution, replace the relevant part of
my commit with that. The rest of the patch just moves it all into
help.h so it can be reused easily-- and always making sure that
DWORD_PTR is correctly set up first.