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
38a9a232
Commit
38a9a232
authored
Sep 04, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use get_stub_manager_from_object in CoDisconnectObject.
parent
af944cef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
27 deletions
+7
-27
compobj.c
dlls/ole32/compobj.c
+7
-1
compobj_private.h
dlls/ole32/compobj_private.h
+0
-1
stubmanager.c
dlls/ole32/stubmanager.c
+0
-25
No files found.
dlls/ole32/compobj.c
View file @
38a9a232
...
...
@@ -2019,6 +2019,7 @@ void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
*/
HRESULT
WINAPI
CoDisconnectObject
(
LPUNKNOWN
lpUnk
,
DWORD
reserved
)
{
struct
stub_manager
*
manager
;
HRESULT
hr
;
IMarshal
*
marshal
;
APARTMENT
*
apt
;
...
...
@@ -2039,7 +2040,12 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved )
if
(
!
apt
)
return
CO_E_NOTINITIALIZED
;
apartment_disconnectobject
(
apt
,
lpUnk
);
manager
=
get_stub_manager_from_object
(
apt
,
lpUnk
,
FALSE
);
if
(
manager
)
{
/* Release stub manager twice, to remove the apartment reference. */
stub_manager_int_release
(
manager
);
stub_manager_int_release
(
manager
);
}
/* Note: native is pretty broken here because it just silently
* fails, without returning an appropriate error code if the object was
...
...
dlls/ole32/compobj_private.h
View file @
38a9a232
...
...
@@ -235,7 +235,6 @@ APARTMENT *apartment_findfromoxid(OXID oxid, BOOL ref) DECLSPEC_HIDDEN;
APARTMENT
*
apartment_findfromtid
(
DWORD
tid
)
DECLSPEC_HIDDEN
;
DWORD
apartment_release
(
struct
apartment
*
apt
)
DECLSPEC_HIDDEN
;
HRESULT
apartment_disconnectproxies
(
struct
apartment
*
apt
)
DECLSPEC_HIDDEN
;
void
apartment_disconnectobject
(
struct
apartment
*
apt
,
void
*
object
)
DECLSPEC_HIDDEN
;
static
inline
HRESULT
apartment_getoxid
(
const
struct
apartment
*
apt
,
OXID
*
oxid
)
{
*
oxid
=
apt
->
oxid
;
...
...
dlls/ole32/stubmanager.c
View file @
38a9a232
...
...
@@ -356,31 +356,6 @@ struct stub_manager *get_stub_manager_from_object(APARTMENT *apt, IUnknown *obj,
return
result
;
}
/* removes the apartment reference to an object, destroying it when no other
* threads have a reference to it */
void
apartment_disconnectobject
(
struct
apartment
*
apt
,
void
*
object
)
{
BOOL
found
=
FALSE
;
struct
stub_manager
*
stubmgr
;
EnterCriticalSection
(
&
apt
->
cs
);
LIST_FOR_EACH_ENTRY
(
stubmgr
,
&
apt
->
stubmgrs
,
struct
stub_manager
,
entry
)
{
if
(
stubmgr
->
object
==
object
)
{
found
=
TRUE
;
stub_manager_int_release
(
stubmgr
);
break
;
}
}
LeaveCriticalSection
(
&
apt
->
cs
);
if
(
found
)
TRACE
(
"disconnect object %p
\n
"
,
object
);
else
WARN
(
"couldn't find object %p
\n
"
,
object
);
}
/* gets the stub manager associated with an object id - caller must have
* a reference to the apartment while a reference to the stub manager is held.
* it must also call release on the stub manager when it is no longer needed */
...
...
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