mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[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:
parent
b04664ddad
commit
8d0ff31cca
7 changed files with 0 additions and 42 deletions
|
@ -40,12 +40,6 @@ static VOID InitializeAtlModule(HINSTANCE hInstance, BOOL bInitialize)
|
||||||
{
|
{
|
||||||
if (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);
|
gModule.Init(ObjectMap, hInstance, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -45,12 +45,6 @@ static VOID InitializeAtlModule(HINSTANCE hInstance, BOOL bInitialize)
|
||||||
{
|
{
|
||||||
if (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);
|
gModule.Init(ObjectMap, hInstance, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -119,12 +119,6 @@ STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
|
||||||
{
|
{
|
||||||
g_hRShell = hInstance;
|
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);
|
gModule.Init(NULL, hInstance, NULL);
|
||||||
DisableThreadLibraryCalls(hInstance);
|
DisableThreadLibraryCalls(hInstance);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,12 +33,6 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
g_hInstance = hinstDLL;
|
g_hInstance = hinstDLL;
|
||||||
DisableThreadLibraryCalls(g_hInstance);
|
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);
|
g_Module.Init(ObjectMap, g_hInstance, NULL);
|
||||||
}
|
}
|
||||||
else if (fdwReason == DLL_PROCESS_DETACH)
|
else if (fdwReason == DLL_PROCESS_DETACH)
|
||||||
|
|
|
@ -34,12 +34,6 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
g_hInstance = hinstDLL;
|
g_hInstance = hinstDLL;
|
||||||
DisableThreadLibraryCalls(g_hInstance);
|
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);
|
g_Module.Init(ObjectMap, g_hInstance, NULL);
|
||||||
}
|
}
|
||||||
else if (fdwReason == DLL_PROCESS_DETACH)
|
else if (fdwReason == DLL_PROCESS_DETACH)
|
||||||
|
|
|
@ -60,12 +60,6 @@ STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
|
||||||
|
|
||||||
if (dwReason == DLL_PROCESS_ATTACH)
|
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);
|
gModule.Init(ObjectMap, hInstance, NULL);
|
||||||
DisableThreadLibraryCalls (hInstance);
|
DisableThreadLibraryCalls (hInstance);
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,12 +290,6 @@ STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
|
||||||
TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad);
|
TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad);
|
||||||
if (dwReason == DLL_PROCESS_ATTACH)
|
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;
|
shell32_hInstance = hInstance;
|
||||||
gModule.Init(ObjectMap, hInstance, NULL);
|
gModule.Init(ObjectMap, hInstance, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue