Alexandre Julliard : urlmon:
Create a message window for each binding to make sure they are cleaned
up properly .
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 16 05:28:52 CDT 2006
Module: wine
Branch: master
Commit: d3d3aba3a3cebd6bae24e73c3377181be4393c58
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d3d3aba3a3cebd6bae24e73c3377181be4393c58
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Oct 16 11:32:17 2006 +0200
urlmon: Create a message window for each binding to make sure they are cleaned up properly.
---
dlls/urlmon/binding.c | 14 +++++---------
dlls/urlmon/urlmon_main.c | 4 ----
dlls/urlmon/urlmon_main.h | 2 --
3 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index 84e4186..d2b3ca9 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -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(IBin
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)
diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c
index f7e281e..b083871 100644
--- a/dlls/urlmon/urlmon_main.c
+++ b/dlls/urlmon/urlmon_main.c
@@ -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,
break;
case DLL_PROCESS_DETACH:
- if(urlmon_tls)
- TlsFree(urlmon_tls);
if (hCabinet)
FreeLibrary(hCabinet);
hCabinet = NULL;
diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h
index 240fdfe..4e6e214 100644
--- a/dlls/urlmon/urlmon_main.h
+++ b/dlls/urlmon/urlmon_main.h
@@ -59,6 +59,4 @@ HRESULT get_protocol_handler(LPCWSTR url
HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
-extern DWORD urlmon_tls;
-
#endif /* __WINE_URLMON_MAIN_H */
More information about the wine-cvs
mailing list