Author: gadamopoulos
Date: Sat Jul 20 17:50:40 2013
New Revision: 59543
URL:
http://svn.reactos.org/svn/reactos?rev=59543&view=rev
Log:
[browseui.cpp]
- Improve the hack for the global constructors by manually calling them only during
DLL_PROCESS_ATTACH
Modified:
trunk/reactos/dll/win32/browseui/browseui.cpp
Modified: trunk/reactos/dll/win32/browseui/browseui.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/browseu…
==============================================================================
--- trunk/reactos/dll/win32/browseui/browseui.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/browseui.cpp [iso-8859-1] Sat Jul 20 17:50:40 2013
@@ -57,14 +57,14 @@
{
TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad);
- /* HACK - the global constructors don't run, so I placement new them here */
- new (&gModule) CBrowseUIModule;
- new (&gWinModule) CAtlWinModule;
- new (&_AtlBaseModule) CAtlBaseModule;
- new (&_AtlComModule) CAtlComModule;
-
if (dwReason == DLL_PROCESS_ATTACH)
{
+ /* HACK - the global constructors don't run, so I placement new them here */
+ new (&gModule) CBrowseUIModule;
+ new (&gWinModule) CAtlWinModule;
+ new (&_AtlBaseModule) CAtlBaseModule;
+ new (&_AtlComModule) CAtlComModule;
+
gModule.Init(ObjectMap, hInstance, NULL);
DisableThreadLibraryCalls (hInstance);
}