Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bbc081e8
Commit
bbc081e8
authored
Feb 03, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Feb 03, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly implement DllCanUnloadNow ref counting.
parent
78d096c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
5 deletions
+35
-5
sec_mgr.c
dlls/urlmon/sec_mgr.c
+10
-0
umon.c
dlls/urlmon/umon.c
+4
-0
urlmon_main.c
dlls/urlmon/urlmon_main.c
+14
-5
urlmon_main.h
dlls/urlmon/urlmon_main.h
+7
-0
No files found.
dlls/urlmon/sec_mgr.c
View file @
bbc081e8
...
...
@@ -82,6 +82,8 @@ static ULONG WINAPI SecManagerImpl_AddRef(IInternetSecurityManager* iface)
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
URLMON_LockModule
();
return
refCount
;
}
...
...
@@ -96,6 +98,9 @@ static ULONG WINAPI SecManagerImpl_Release(IInternetSecurityManager* iface)
if
(
!
refCount
){
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
URLMON_UnlockModule
();
return
refCount
;
}
...
...
@@ -242,6 +247,8 @@ static ULONG WINAPI ZoneMgrImpl_AddRef(IInternetZoneManager* iface)
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
URLMON_LockModule
();
return
refCount
;
}
...
...
@@ -257,6 +264,9 @@ static ULONG WINAPI ZoneMgrImpl_Release(IInternetZoneManager* iface)
if
(
!
refCount
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
URLMON_UnlockModule
();
return
refCount
;
}
...
...
dlls/urlmon/umon.c
View file @
bbc081e8
...
...
@@ -107,6 +107,8 @@ static ULONG WINAPI URLMonikerImpl_AddRef(IMoniker* iface)
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
URLMON_LockModule
();
return
refCount
;
}
...
...
@@ -126,6 +128,8 @@ static ULONG WINAPI URLMonikerImpl_Release(IMoniker* iface)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
URLMON_UnlockModule
();
return
refCount
;
}
...
...
dlls/urlmon/urlmon_main.c
View file @
bbc081e8
...
...
@@ -37,6 +37,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
urlmon
);
LONG
URLMON_refCount
=
0
;
HINSTANCE
URLMON_hInstance
=
0
;
/***********************************************************************
...
...
@@ -76,9 +78,7 @@ HRESULT WINAPI URLMON_DllInstall(BOOL bInstall, LPCWSTR cmdline)
*/
HRESULT
WINAPI
URLMON_DllCanUnloadNow
(
void
)
{
FIXME
(
"(void): stub
\n
"
);
return
S_FALSE
;
return
URLMON_refCount
!=
0
?
S_FALSE
:
S_OK
;
}
...
...
@@ -125,6 +125,8 @@ CF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
static
ULONG
WINAPI
CF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
URLMON_LockModule
();
return
InterlockedIncrement
(
&
This
->
ref
);
}
...
...
@@ -137,6 +139,8 @@ static ULONG WINAPI CF_Release(LPCLASSFACTORY iface)
if
(
ref
==
0
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
URLMON_UnlockModule
();
return
ref
;
}
...
...
@@ -160,8 +164,13 @@ static HRESULT WINAPI CF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter,
static
HRESULT
WINAPI
CF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p)->(%d),stub!
\n
"
,
This
,
dolock
);
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
URLMON_LockModule
();
else
URLMON_UnlockModule
();
return
S_OK
;
}
...
...
dlls/urlmon/urlmon_main.h
View file @
bbc081e8
...
...
@@ -28,6 +28,13 @@ extern HINSTANCE URLMON_hInstance;
extern
HRESULT
SecManagerImpl_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
);
extern
HRESULT
ZoneMgrImpl_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
);
/**********************************************************************
* Dll lifetime tracking declaration for urlmon.dll
*/
extern
LONG
URLMON_refCount
;
static
inline
void
URLMON_LockModule
()
{
InterlockedIncrement
(
&
URLMON_refCount
);
}
static
inline
void
URLMON_UnlockModule
()
{
InterlockedDecrement
(
&
URLMON_refCount
);
}
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
#endif
/* __WINE_URLMON_MAIN_H */
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