mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:43:04 +00:00
[SHELL32] Don't call CoInitialize in DllMain, bad things happen when calling into dll's that are being loaded! CORE-12443 #comment Please retest!
svn path=/trunk/; revision=73434
This commit is contained in:
parent
cce01fa95c
commit
54e99fcd1b
3 changed files with 4 additions and 3 deletions
|
@ -87,7 +87,7 @@ static HRESULT getIconLocationForFolder(IShellFolder * psf, LPCITEMIDLIST pidl,
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitIconOverlays(void)
|
static void InitIconOverlays(void)
|
||||||
{
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
DWORD dwIndex, dwResult, dwSize;
|
DWORD dwIndex, dwResult, dwSize;
|
||||||
|
@ -161,6 +161,8 @@ GetIconOverlay(LPCITEMIDLIST pidl, WCHAR * wTemp, int* pIndex)
|
||||||
if(!SHGetPathFromIDListW(pidl, szPath))
|
if(!SHGetPathFromIDListW(pidl, szPath))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (!Handlers)
|
||||||
|
InitIconOverlays();
|
||||||
|
|
||||||
HighestPriority = 101;
|
HighestPriority = 101;
|
||||||
IconIndex = NumIconOverlayHandlers;
|
IconIndex = NumIconOverlayHandlers;
|
||||||
|
|
|
@ -307,9 +307,9 @@ STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
|
||||||
InitCtrls.dwICC = ICC_WIN95_CLASSES | ICC_DATE_CLASSES | ICC_USEREX_CLASSES;
|
InitCtrls.dwICC = ICC_WIN95_CLASSES | ICC_DATE_CLASSES | ICC_USEREX_CLASSES;
|
||||||
InitCommonControlsEx(&InitCtrls);
|
InitCommonControlsEx(&InitCtrls);
|
||||||
|
|
||||||
|
/* Bad idea, initialization in DllMain! */
|
||||||
SIC_Initialize();
|
SIC_Initialize();
|
||||||
InitChangeNotifications();
|
InitChangeNotifications();
|
||||||
InitIconOverlays();
|
|
||||||
}
|
}
|
||||||
else if (dwReason == DLL_PROCESS_DETACH)
|
else if (dwReason == DLL_PROCESS_DETACH)
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,7 +109,6 @@ HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
|
||||||
/* Change Notification */
|
/* Change Notification */
|
||||||
void InitChangeNotifications(void) DECLSPEC_HIDDEN;
|
void InitChangeNotifications(void) DECLSPEC_HIDDEN;
|
||||||
void FreeChangeNotifications(void) DECLSPEC_HIDDEN;
|
void FreeChangeNotifications(void) DECLSPEC_HIDDEN;
|
||||||
void InitIconOverlays(void);
|
|
||||||
|
|
||||||
/* file operation */
|
/* file operation */
|
||||||
#define ASK_DELETE_FILE 1
|
#define ASK_DELETE_FILE 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue