Index: mscmain.c =================================================================== --- lib/sdk/crt/startup/mscmain.c (revision 69942) +++ lib/sdk/crt/startup/mscmain.c (working copy) @@ -20,31 +20,6 @@ #error Unsupported platform #endif -/* - * Initializer / constructor handling - * see http://msdn.microsoft.com/en-us/library/bb918180.aspx - * Destructors are registered from the initializers using atexit() - */ - -extern _PVFV __xi_a[]; -extern _PVFV __xi_z[]; -extern _PVFV __xc_a[]; -extern _PVFV __xc_z[]; - -static -void -__do_xtors( - _PVFV *start, - _PVFV *end) -{ - _PVFV *current; - for (current = start; current < end; current++) - { - if (*current != NULL) - (*current)(); - } -} - void _pei386_runtime_relocator(void) { } @@ -55,13 +30,6 @@ return 1; } -void -__do_global_ctors(void) -{ - __do_xtors(__xi_a, __xi_z); - __do_xtors(__xc_a, __xc_z); -} - BOOL WINAPI _CRT_INIT0(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) @@ -114,8 +82,6 @@ initialized = 1; _RTC_Initialize(); - - __do_global_ctors (); } } Index: base/applications/rapps_new/winmain.cpp =================================================================== --- base/applications/rapps_new/winmain.cpp (revision 69942) +++ base/applications/rapps_new/winmain.cpp (working copy) @@ -40,12 +40,6 @@ { 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 Index: base/shell/explorer/explorer.cpp =================================================================== --- base/shell/explorer/explorer.cpp (revision 69942) +++ base/shell/explorer/explorer.cpp (working copy) @@ -45,12 +45,6 @@ { 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 Index: base/shell/rshell/misc.cpp =================================================================== --- base/shell/rshell/misc.cpp (revision 69942) +++ base/shell/rshell/misc.cpp (working copy) @@ -119,12 +119,6 @@ { 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); } Index: dll/shellext/ntobjshex/ntobjshex.cpp =================================================================== --- dll/shellext/ntobjshex/ntobjshex.cpp (revision 69942) +++ dll/shellext/ntobjshex/ntobjshex.cpp (working copy) @@ -33,12 +33,6 @@ 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) Index: dll/shellext/stobject/stobject.cpp =================================================================== --- dll/shellext/stobject/stobject.cpp (revision 69942) +++ dll/shellext/stobject/stobject.cpp (working copy) @@ -34,12 +34,6 @@ 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) Index: dll/win32/browseui/browseui.cpp =================================================================== --- dll/win32/browseui/browseui.cpp (revision 69942) +++ dll/win32/browseui/browseui.cpp (working copy) @@ -60,12 +60,6 @@ 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); } Index: dll/win32/shell32/shell32.cpp =================================================================== --- dll/win32/shell32/shell32.cpp (revision 69942) +++ dll/win32/shell32/shell32.cpp (working copy) @@ -290,12 +290,6 @@ 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);