From 3532f48d44ade65b468e3280d92605636ab26149 Mon Sep 17 00:00:00 2001 From: Xlord2 Date: Wed, 2 Mar 2016 18:55:00 +0100 Subject: [PATCH] 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 --- docs/changes.txt | 7 +++++++ src/msw/helpchm.cpp | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index af9241ee04..c16973f842 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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) ---------------------------- diff --git a/src/msw/helpchm.cpp b/src/msw/helpchm.cpp index a819a28458..f948f56d51 100644 --- a/src/msw/helpchm.cpp +++ b/src/msw/helpchm.cpp @@ -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