urlmon: Delay-load cabinet.dll as native urlmon doesn't import it.
This commit is contained in:
parent
c340ddd310
commit
4582a2bb8e
|
@ -4,7 +4,7 @@ SRCDIR = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
MODULE = urlmon.dll
|
MODULE = urlmon.dll
|
||||||
IMPORTLIB = liburlmon.$(IMPLIBEXT)
|
IMPORTLIB = liburlmon.$(IMPLIBEXT)
|
||||||
IMPORTS = cabinet ole32 shlwapi wininet user32 advapi32 kernel32 ntdll
|
IMPORTS = ole32 shlwapi wininet user32 advapi32 kernel32 ntdll
|
||||||
EXTRALIBS = -luuid
|
EXTRALIBS = -luuid
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
@ stdcall -private DllRegisterServer()
|
@ stdcall -private DllRegisterServer()
|
||||||
@ stdcall -private DllRegisterServerEx()
|
@ stdcall -private DllRegisterServerEx()
|
||||||
@ stdcall -private DllUnregisterServer()
|
@ stdcall -private DllUnregisterServer()
|
||||||
@ stdcall Extract(long ptr) cabinet.Extract
|
@ stdcall Extract(long ptr)
|
||||||
@ stdcall FaultInIEFeature(long ptr ptr long)
|
@ stdcall FaultInIEFeature(long ptr ptr long)
|
||||||
@ stub FindMediaType
|
@ stub FindMediaType
|
||||||
@ stub FindMediaTypeClass
|
@ stub FindMediaTypeClass
|
||||||
|
|
|
@ -41,6 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||||
LONG URLMON_refCount = 0;
|
LONG URLMON_refCount = 0;
|
||||||
|
|
||||||
HINSTANCE URLMON_hInstance = 0;
|
HINSTANCE URLMON_hInstance = 0;
|
||||||
|
static HMODULE hCabinet = NULL;
|
||||||
|
|
||||||
DWORD urlmon_tls = 0;
|
DWORD urlmon_tls = 0;
|
||||||
|
|
||||||
|
@ -63,6 +64,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
if(urlmon_tls)
|
if(urlmon_tls)
|
||||||
TlsFree(urlmon_tls);
|
TlsFree(urlmon_tls);
|
||||||
|
if (hCabinet)
|
||||||
|
FreeLibrary(hCabinet);
|
||||||
|
hCabinet = NULL;
|
||||||
init_session(FALSE);
|
init_session(FALSE);
|
||||||
URLMON_hInstance = 0;
|
URLMON_hInstance = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -597,3 +601,20 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
|
||||||
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* Extract (URLMON.@)
|
||||||
|
*/
|
||||||
|
HRESULT WINAPI Extract(void *dest, LPCSTR szCabName)
|
||||||
|
{
|
||||||
|
HRESULT (WINAPI *pExtract)(void *, LPCSTR);
|
||||||
|
|
||||||
|
if (!hCabinet)
|
||||||
|
hCabinet = LoadLibraryA("cabinet.dll");
|
||||||
|
|
||||||
|
if (!hCabinet) return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
pExtract = (void *)GetProcAddress(hCabinet, "Extract");
|
||||||
|
if (!pExtract) return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
|
||||||
|
return pExtract(dest, szCabName);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue