1. <htmlhelp.h> is not required any more
2. fixed memory leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14528
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// dll symbol handle
static HTMLHELP gs_htmlHelp = 0;
// dll symbol handle
static HTMLHELP gs_htmlHelp = 0;
-static wxPluginLibrary *gs_libHtmlHelp = NULL;
static bool LoadHtmlHelpLibrary()
{
static bool LoadHtmlHelpLibrary()
{
- gs_libHtmlHelp = wxPluginManager::LoadLibrary( _T("HHCTRL.OCX"), wxDL_DEFAULT | wxDL_VERBATIM );
+ wxPluginLibrary *lib = wxPluginManager::LoadLibrary( _T("HHCTRL.OCX"), wxDL_DEFAULT | wxDL_VERBATIM );
{
wxLogError(_("MS HTML Help functions are unavailable because the MS HTML Help library is not installed on this machine. Please install it."));
return FALSE;
}
else
{
{
wxLogError(_("MS HTML Help functions are unavailable because the MS HTML Help library is not installed on this machine. Please install it."));
return FALSE;
}
else
{
- gs_htmlHelp = (HTMLHELP)gs_libHtmlHelp->GetSymbol( HTMLHELP_NAME );
+ gs_htmlHelp = (HTMLHELP)lib->GetSymbol( HTMLHELP_NAME );
if( !gs_htmlHelp )
{
wxLogError(_("Failed to initialize MS HTML Help."));
if( !gs_htmlHelp )
{
wxLogError(_("Failed to initialize MS HTML Help."));
- gs_libHtmlHelp->UnrefLib();
static void UnloadHtmlHelpLibrary()
{
static void UnloadHtmlHelpLibrary()
{
{
wxPluginManager::UnloadLibrary( _T("HHCTRL.OCX") );
{
wxPluginManager::UnloadLibrary( _T("HHCTRL.OCX") );
- gs_libHtmlHelp->UnrefLib();