Fix crash when using HTML help in 64 bit wxMSW build

HtmlHelp() function takes 64 bit ULONG_PTR, not 32 bit DWORD, in 64 bits, see
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762267.aspx and
passing it a wrongly sized pointer resulted in a crash.

Closes https://github.com/wxWidgets/wxWidgets/pull/239
This commit is contained in:
Xlord2
2016-03-02 18:55:00 +01:00
committed by Vadim Zeitlin
parent d053a90486
commit 3532f48d44
2 changed files with 9 additions and 2 deletions

View File

@@ -48,6 +48,13 @@ Changes in behaviour which may result in build errors
- WXWIN_OS_DESCRIPTION doesn't exist any longer, use wxGetOsDescription().
3.1.1: (not released yet)
----------------------------
wxMSW:
- Fix crash when using wxCHMHelpController() in 64 bit builds (Xlord2).
3.1.0: (released 2016-02-29)
----------------------------

View File

@@ -36,10 +36,10 @@
// ----------------------------------------------------------------------------
#ifndef UNICODE
typedef HWND ( WINAPI * HTMLHELP )( HWND, LPCSTR, UINT, DWORD );
typedef HWND ( WINAPI * HTMLHELP )( HWND, LPCSTR, UINT, ULONG_PTR );
#define HTMLHELP_NAME wxT("HtmlHelpA")
#else // ANSI
typedef HWND ( WINAPI * HTMLHELP )( HWND, LPCWSTR, UINT, DWORD );
typedef HWND ( WINAPI * HTMLHELP )( HWND, LPCWSTR, UINT, ULONG_PTR );
#define HTMLHELP_NAME wxT("HtmlHelpW")
#endif