From c8a448977cbe609b4ce8f4092b3c2903556dc514 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 19 Dec 2005 14:34:12 +0000 Subject: [PATCH] removed DllMain(): we don't even compile it with any compiler but VC8 and with VC8 it results in a crash; we need another way to make it possible to use wx DLL from another DLL, this one is flawed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/main.cpp | 49 ------------------------------------------------ 1 file changed, 49 deletions(-) diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 1967e0cff2..35f1ada5fc 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -382,55 +382,6 @@ WXDLLEXPORT int wxEntry(HINSTANCE hInstance, return wxEntry(argc, argv); } -// May wish not to have a DllMain or WinMain, e.g. if we're programming -// a Netscape plugin or if we're writing a console application -#if !defined(NOMAIN) - -extern "C" -{ - -// ---------------------------------------------------------------------------- -// WinMain -// ---------------------------------------------------------------------------- - -// Note that WinMain is also defined in dummy.obj, which is linked to -// an application that is using the DLL version of wxWidgets. - -#if defined(_WINDLL) - -// DLL entry point - -BOOL WINAPI -DllMain(HINSTANCE hModule, DWORD fdwReason, LPVOID WXUNUSED(lpReserved)) -{ - // Only call wxEntry if the application itself is part of the DLL. - // If only the wxWidgets library is in the DLL, then the - // initialisation will be called when the application implicitly - // calls WinMain. -#ifndef WXMAKINGDLL - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - return wxEntry(hModule); - - case DLL_PROCESS_DETACH: - wxEntryCleanup(); - break; - } -#else - (void)hModule; - (void)fdwReason; -#endif // !WXMAKINGDLL - - return TRUE; -} - -#endif // _WINDLL - -} // extern "C" - -#endif // !NOMAIN - #endif // wxUSE_GUI && __WXMSW__ // ----------------------------------------------------------------------------