Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9ca4f9b6
Commit
9ca4f9b6
authored
Feb 13, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Unregister window class on DLL unload.
parent
16acd97e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
20 deletions
+32
-20
bindprot.c
dlls/urlmon/bindprot.c
+30
-20
urlmon_main.c
dlls/urlmon/urlmon_main.c
+1
-0
urlmon_main.h
dlls/urlmon/urlmon_main.h
+1
-0
No files found.
dlls/urlmon/bindprot.c
View file @
9ca4f9b6
...
@@ -83,14 +83,36 @@ static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
...
@@ -83,14 +83,36 @@ static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return
DefWindowProcW
(
hwnd
,
msg
,
wParam
,
lParam
);
return
DefWindowProcW
(
hwnd
,
msg
,
wParam
,
lParam
);
}
}
static
const
WCHAR
wszURLMonikerNotificationWindow
[]
=
{
'U'
,
'R'
,
'L'
,
' '
,
'M'
,
'o'
,
'n'
,
'i'
,
'k'
,
'e'
,
'r'
,
' '
,
'N'
,
'o'
,
't'
,
'i'
,
'f'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
' '
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
0
};
static
ATOM
notif_wnd_class
;
static
BOOL
WINAPI
register_notif_wnd_class
(
INIT_ONCE
*
once
,
void
*
param
,
void
**
context
)
{
static
WNDCLASSEXW
wndclass
=
{
sizeof
(
wndclass
),
0
,
notif_wnd_proc
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
wszURLMonikerNotificationWindow
,
NULL
};
wndclass
.
hInstance
=
hProxyDll
;
notif_wnd_class
=
RegisterClassExW
(
&
wndclass
);
return
TRUE
;
}
void
unregister_notif_wnd_class
(
void
)
{
if
(
notif_wnd_class
)
UnregisterClassW
(
MAKEINTRESOURCEW
(
notif_wnd_class
),
hProxyDll
);
}
HWND
get_notif_hwnd
(
void
)
HWND
get_notif_hwnd
(
void
)
{
{
static
ATOM
wnd_class
=
0
;
tls_data_t
*
tls_data
;
tls_data_t
*
tls_data
;
static
const
WCHAR
wszURLMonikerNotificationWindow
[]
=
static
INIT_ONCE
init_once
=
INIT_ONCE_STATIC_INIT
;
{
'U'
,
'R'
,
'L'
,
' '
,
'M'
,
'o'
,
'n'
,
'i'
,
'k'
,
'e'
,
'r'
,
' '
,
'N'
,
'o'
,
't'
,
'i'
,
'f'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
' '
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
0
};
tls_data
=
get_tls_data
();
tls_data
=
get_tls_data
();
if
(
!
tls_data
)
if
(
!
tls_data
)
...
@@ -101,23 +123,11 @@ HWND get_notif_hwnd(void)
...
@@ -101,23 +123,11 @@ HWND get_notif_hwnd(void)
return
tls_data
->
notif_hwnd
;
return
tls_data
->
notif_hwnd
;
}
}
if
(
!
wnd_class
)
{
InitOnceExecuteOnce
(
&
init_once
,
register_notif_wnd_class
,
NULL
,
NULL
);
static
WNDCLASSEXW
wndclass
=
{
if
(
!
notif_wnd_class
)
sizeof
(
wndclass
),
0
,
return
NULL
;
notif_wnd_proc
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
wszURLMonikerNotificationWindow
,
NULL
};
wndclass
.
hInstance
=
hProxyDll
;
wnd_class
=
RegisterClassExW
(
&
wndclass
);
if
(
!
wnd_class
&&
GetLastError
()
==
ERROR_CLASS_ALREADY_EXISTS
)
wnd_class
=
1
;
}
tls_data
->
notif_hwnd
=
CreateWindowExW
(
0
,
wszURLMonikerNotificationWindow
,
tls_data
->
notif_hwnd
=
CreateWindowExW
(
0
,
MAKEINTRESOURCEW
(
notif_wnd_class
)
,
wszURLMonikerNotificationWindow
,
0
,
0
,
0
,
0
,
0
,
HWND_MESSAGE
,
wszURLMonikerNotificationWindow
,
0
,
0
,
0
,
0
,
0
,
HWND_MESSAGE
,
NULL
,
hProxyDll
,
NULL
);
NULL
,
hProxyDll
,
NULL
);
if
(
tls_data
->
notif_hwnd
)
if
(
tls_data
->
notif_hwnd
)
...
...
dlls/urlmon/urlmon_main.c
View file @
9ca4f9b6
...
@@ -139,6 +139,7 @@ static void process_detach(void)
...
@@ -139,6 +139,7 @@ static void process_detach(void)
free_session
();
free_session
();
free_tls_list
();
free_tls_list
();
unregister_notif_wnd_class
();
}
}
/***********************************************************************
/***********************************************************************
...
...
dlls/urlmon/urlmon_main.h
View file @
9ca4f9b6
...
@@ -225,6 +225,7 @@ typedef struct {
...
@@ -225,6 +225,7 @@ typedef struct {
tls_data_t
*
get_tls_data
(
void
)
DECLSPEC_HIDDEN
;
tls_data_t
*
get_tls_data
(
void
)
DECLSPEC_HIDDEN
;
void
unregister_notif_wnd_class
(
void
)
DECLSPEC_HIDDEN
;
HWND
get_notif_hwnd
(
void
)
DECLSPEC_HIDDEN
;
HWND
get_notif_hwnd
(
void
)
DECLSPEC_HIDDEN
;
void
release_notif_hwnd
(
HWND
)
DECLSPEC_HIDDEN
;
void
release_notif_hwnd
(
HWND
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment