patch for not calling wxEntryCleanup() from a DLL applied
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -33,6 +33,9 @@
|
|||||||
|
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
|
|
||||||
|
// from src/msw/app.cpp
|
||||||
|
extern void WXDLLEXPORT wxEntryCleanup();
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// globals
|
// globals
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -95,22 +98,24 @@ BOOL WINAPI DllEntryPoint (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
|
|||||||
BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
|
BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#ifndef WXMAKINGDLL
|
||||||
switch (fdwReason)
|
switch (fdwReason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
// Only call wxEntry if the application itself is part of the DLL.
|
// Only call wxEntry if the application itself is part of the DLL.
|
||||||
// If only the wxWindows library is in the DLL, then the initialisation
|
// If only the wxWindows library is in the DLL, then the
|
||||||
// will be called when the application implicitly calls WinMain.
|
// initialisation will be called when the application implicitly
|
||||||
|
// calls WinMain.
|
||||||
#if !defined(WXMAKINGDLL)
|
|
||||||
return wxEntry((WXHINSTANCE) hModule);
|
return wxEntry((WXHINSTANCE) hModule);
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
default:
|
if ( wxTheApp )
|
||||||
|
wxTheApp->OnExit();
|
||||||
|
wxEntryCleanup();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif // !WXMAKINGDLL
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user