[SHELL][RAPPS_NEW]

- Don't call placement new on static objects. The constructors work just fine.
CORE-10562 #resolve

svn path=/trunk/; revision=70040
This commit is contained in:
Thomas Faber 2015-11-22 21:13:14 +00:00
parent b04664ddad
commit 8d0ff31cca
7 changed files with 0 additions and 42 deletions

View file

@ -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

View file

@ -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

View file

@ -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);
}

View file

@ -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)

View file

@ -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)

View file

@ -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);
}

View file

@ -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);