From 99f8b1fe0619366fc6e19f578020800a0e2976bd Mon Sep 17 00:00:00 2001 From: Rafal Harabien Date: Thu, 17 Nov 2011 22:19:48 +0000 Subject: [PATCH] [SHELL32] - Revert r54404 svn path=/trunk/; revision=54413 --- reactos/dll/win32/shell32/shell32_main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/reactos/dll/win32/shell32/shell32_main.cpp b/reactos/dll/win32/shell32/shell32_main.cpp index 9577cf22cc5..4cff4065d30 100644 --- a/reactos/dll/win32/shell32/shell32_main.cpp +++ b/reactos/dll/win32/shell32/shell32_main.cpp @@ -1377,6 +1377,11 @@ HINSTANCE shell32_hInstance; HIMAGELIST ShellSmallIconList = 0; HIMAGELIST ShellBigIconList = 0; +void *operator new (size_t, void *buf) +{ + return buf; +} + /************************************************************************* * SHELL32 DllMain * @@ -1388,6 +1393,12 @@ 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);