WINE_DEFAULT_DEBUG_CHANNEL(shell);
-HINSTANCE shlwapi_hInstance = 0;
-DWORD SHLWAPI_ThreadRef_index = TLS_OUT_OF_INDEXES;
+DECLSPEC_HIDDEN HINSTANCE shlwapi_hInstance = 0;
+DECLSPEC_HIDDEN DWORD SHLWAPI_ThreadRef_index = TLS_OUT_OF_INDEXES;
/*************************************************************************
* SHLWAPI {SHLWAPI}
*
- * The Shell Light-Weight Api dll provides a large number of utility functions
+ * The Shell Light-Weight API dll provides a large number of utility functions
* which are commonly required by Win32 programs. Originally distributed with
* Internet Explorer as a free download, it became a core part of Windows when
* Internet Explorer was 'integrated' into the O/S with the release of Win98.
* SHLWAPI DllMain
*
* NOTES
- * calling oleinitialize here breaks sone apps.
+ * calling oleinitialize here breaks some apps.
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
SHLWAPI_ThreadRef_index = TlsAlloc();
break;
case DLL_PROCESS_DETACH:
+ if (fImpLoad) break;
if (SHLWAPI_ThreadRef_index != TLS_OUT_OF_INDEXES) TlsFree(SHLWAPI_ThreadRef_index);
break;
}
TRACE("(%p)\n",pdvi);
+ if (!pdvi)
+ return E_INVALIDARG;
+
switch (pdvi2->info1.cbSize)
{
case sizeof(DLLVERSIONINFO2):
pdvi2->info1.dwPlatformID = DLLVER_PLATFORM_WINDOWS;
return S_OK;
}
- if (pdvi)
- WARN("pdvi->cbSize = %d, unhandled\n", pdvi2->info1.cbSize);
+
+ WARN("pdvi->cbSize = %d, unhandled\n", pdvi2->info1.cbSize);
return E_INVALIDARG;
}