diff --git a/reactos/base/applications/rapps_new/winmain.cpp b/reactos/base/applications/rapps_new/winmain.cpp index 5326dbfac34..795952c4a7b 100644 --- a/reactos/base/applications/rapps_new/winmain.cpp +++ b/reactos/base/applications/rapps_new/winmain.cpp @@ -40,12 +40,6 @@ static VOID InitializeAtlModule(HINSTANCE hInstance, BOOL bInitialize) { if (bInitialize) { - /* HACK - the global constructors don't run, so I placement new them here */ - new (&gModule) CRAppsModule; - new (&gWinModule) CAtlWinModule; - new (&_AtlBaseModule) CAtlBaseModule; - new (&_AtlComModule) CAtlComModule; - gModule.Init(ObjectMap, hInstance, NULL); } else diff --git a/reactos/base/shell/explorer/explorer.cpp b/reactos/base/shell/explorer/explorer.cpp index 4d869d181be..af1468aea0d 100644 --- a/reactos/base/shell/explorer/explorer.cpp +++ b/reactos/base/shell/explorer/explorer.cpp @@ -45,12 +45,6 @@ static VOID InitializeAtlModule(HINSTANCE hInstance, BOOL bInitialize) { if (bInitialize) { - /* HACK - the global constructors don't run, so I placement new them here */ - new (&gModule) CExplorerModule; - new (&gWinModule) CAtlWinModule; - new (&_AtlBaseModule) CAtlBaseModule; - new (&_AtlComModule) CAtlComModule; - gModule.Init(ObjectMap, hInstance, NULL); } else diff --git a/reactos/base/shell/rshell/misc.cpp b/reactos/base/shell/rshell/misc.cpp index 17329a549cb..88a2a117581 100644 --- a/reactos/base/shell/rshell/misc.cpp +++ b/reactos/base/shell/rshell/misc.cpp @@ -119,12 +119,6 @@ STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad) { g_hRShell = hInstance; - /* HACK - the global constructors don't run, so I placement new them here */ - new (&gModule) CRShellModule; - new (&gWinModule) CAtlWinModule; - new (&_AtlBaseModule) CAtlBaseModule; - new (&_AtlComModule) CAtlComModule; - gModule.Init(NULL, hInstance, NULL); DisableThreadLibraryCalls(hInstance); } diff --git a/reactos/dll/shellext/ntobjshex/ntobjshex.cpp b/reactos/dll/shellext/ntobjshex/ntobjshex.cpp index 1c829f96a2a..8c2cc3d3bf6 100644 --- a/reactos/dll/shellext/ntobjshex/ntobjshex.cpp +++ b/reactos/dll/shellext/ntobjshex/ntobjshex.cpp @@ -33,12 +33,6 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) g_hInstance = hinstDLL; DisableThreadLibraryCalls(g_hInstance); - /* HACK - the global constructors don't run, so I placement new them here */ - new (&g_Module) CComModule; - new (&_AtlWinModule) CAtlWinModule; - new (&_AtlBaseModule) CAtlBaseModule; - new (&_AtlComModule) CAtlComModule; - g_Module.Init(ObjectMap, g_hInstance, NULL); } else if (fdwReason == DLL_PROCESS_DETACH) diff --git a/reactos/dll/shellext/stobject/stobject.cpp b/reactos/dll/shellext/stobject/stobject.cpp index 39ce6a40d04..ed832f9d1cd 100644 --- a/reactos/dll/shellext/stobject/stobject.cpp +++ b/reactos/dll/shellext/stobject/stobject.cpp @@ -34,12 +34,6 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) g_hInstance = hinstDLL; DisableThreadLibraryCalls(g_hInstance); - /* HACK - the global constructors don't run, so I placement new them here */ - new (&g_Module) CComModule; - new (&_AtlWinModule) CAtlWinModule; - new (&_AtlBaseModule) CAtlBaseModule; - new (&_AtlComModule) CAtlComModule; - g_Module.Init(ObjectMap, g_hInstance, NULL); } else if (fdwReason == DLL_PROCESS_DETACH) diff --git a/reactos/dll/win32/browseui/browseui.cpp b/reactos/dll/win32/browseui/browseui.cpp index 9a269ccf008..26e248c01c0 100644 --- a/reactos/dll/win32/browseui/browseui.cpp +++ b/reactos/dll/win32/browseui/browseui.cpp @@ -60,12 +60,6 @@ STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad) 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); } diff --git a/reactos/dll/win32/shell32/shell32.cpp b/reactos/dll/win32/shell32/shell32.cpp index 3d125ba54a1..2038cbd856f 100644 --- a/reactos/dll/win32/shell32/shell32.cpp +++ b/reactos/dll/win32/shell32/shell32.cpp @@ -290,12 +290,6 @@ STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad) TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad); if (dwReason == DLL_PROCESS_ATTACH) { - /* HACK - the global constructors don't run, so I placement new them here */ - new (&gModule) CShell32Module; - new (&_AtlWinModule) CAtlWinModule; - new (&_AtlBaseModule) CAtlBaseModule; - new (&_AtlComModule) CAtlComModule; - shell32_hInstance = hInstance; gModule.Init(ObjectMap, hInstance, NULL);