Commit d3d3aba3 authored by Alexandre Julliard's avatar Alexandre Julliard

urlmon: Create a message window for each binding to make sure they are cleaned up properly.

parent 0b201505
......@@ -250,19 +250,13 @@ static HWND get_notif_hwnd(void)
wndclass.hInstance = URLMON_hInstance;
wnd_class = RegisterClassExW(&wndclass);
if (!wnd_class && GetLastError() == ERROR_CLASS_ALREADY_EXISTS)
wnd_class = 1;
}
if(!urlmon_tls)
urlmon_tls = TlsAlloc();
hwnd = TlsGetValue(urlmon_tls);
if(hwnd)
return hwnd;
hwnd = CreateWindowExW(0, MAKEINTATOMW(wnd_class),
hwnd = CreateWindowExW(0, wszURLMonikerNotificationWindow,
wszURLMonikerNotificationWindow, 0, 0, 0, 0, 0, HWND_MESSAGE,
NULL, URLMON_hInstance, NULL);
TlsSetValue(urlmon_tls, hwnd);
TRACE("hwnd = %p\n", hwnd);
......@@ -691,6 +685,8 @@ static ULONG WINAPI Binding_Release(IBinding *iface)
TRACE("(%p) ref=%d\n", This, ref);
if(!ref) {
if (This->notif_hwnd)
DestroyWindow( This->notif_hwnd );
if(This->callback)
IBindStatusCallback_Release(This->callback);
if(This->protocol)
......
......@@ -43,8 +43,6 @@ LONG URLMON_refCount = 0;
HINSTANCE URLMON_hInstance = 0;
static HMODULE hCabinet = NULL;
DWORD urlmon_tls = 0;
static void init_session(BOOL);
/***********************************************************************
......@@ -62,8 +60,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
break;
case DLL_PROCESS_DETACH:
if(urlmon_tls)
TlsFree(urlmon_tls);
if (hCabinet)
FreeLibrary(hCabinet);
hCabinet = NULL;
......
......@@ -59,6 +59,4 @@ HRESULT get_protocol_handler(LPCWSTR url, IClassFactory **ret);
HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
extern DWORD urlmon_tls;
#endif /* __WINE_URLMON_MAIN_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment