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
28356337
Commit
28356337
authored
Jan 04, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 04, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement proxy manager.
parent
ffc55dad
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
22 deletions
+24
-22
compobj.c
dlls/ole32/compobj.c
+9
-8
compobj_private.h
dlls/ole32/compobj_private.h
+15
-14
marshal.c
dlls/ole32/marshal.c
+0
-0
No files found.
dlls/ole32/compobj.c
View file @
28356337
...
@@ -226,6 +226,7 @@ APARTMENT* COM_CreateApartment(DWORD model)
...
@@ -226,6 +226,7 @@ APARTMENT* COM_CreateApartment(DWORD model)
else
else
apt
=
NtCurrentTeb
()
->
ReservedForOle
;
apt
=
NtCurrentTeb
()
->
ReservedForOle
;
list_init
(
&
apt
->
proxies
);
list_init
(
&
apt
->
stubmgrs
);
list_init
(
&
apt
->
stubmgrs
);
apt
->
oidc
=
1
;
apt
->
oidc
=
1
;
...
@@ -263,6 +264,14 @@ static void COM_DestroyApartment(APARTMENT *apt)
...
@@ -263,6 +264,14 @@ static void COM_DestroyApartment(APARTMENT *apt)
apt
->
prev
=
NULL
;
apt
->
next
=
NULL
;
apt
->
prev
=
NULL
;
apt
->
next
=
NULL
;
LeaveCriticalSection
(
&
csApartment
);
LeaveCriticalSection
(
&
csApartment
);
if
(
apt
->
model
&
COINIT_APARTMENTTHREADED
)
{
if
(
apt
->
model
&
COINIT_APARTMENTTHREADED
)
{
/* disconnect proxies to release the corresponding stubs.
* It is confirmed in "Essential COM" in the sub-chapter on
* "Lifecycle Management and Marshalling" that the native version also
* disconnects proxies in this function. */
/* FIXME: this should also be called for MTA destruction, but that
* requires restructuring how apartments work slightly. */
MARSHAL_Disconnect_Proxies
(
apt
);
if
(
apt
->
win
)
DestroyWindow
(
apt
->
win
);
if
(
apt
->
win
)
DestroyWindow
(
apt
->
win
);
DeleteCriticalSection
(
&
apt
->
cs
);
DeleteCriticalSection
(
&
apt
->
cs
);
}
}
...
@@ -545,14 +554,6 @@ void WINAPI CoUninitialize(void)
...
@@ -545,14 +554,6 @@ void WINAPI CoUninitialize(void)
RunningObjectTableImpl_UnInitialize
();
RunningObjectTableImpl_UnInitialize
();
/* disconnect proxies to release the corresponding stubs.
* It is confirmed in "Essential COM" in the sub-chapter on
* "Lifecycle Management and Marshalling" that the native version also
* does some kind of proxy cleanup in this function.
* FIXME: does it just disconnect or completely destroy the proxies?
* FIXME: should this be in the apartment destructor? */
MARSHAL_Disconnect_Proxies
();
/* Release the references to the registered class objects */
/* Release the references to the registered class objects */
COM_RevokeAllClasses
();
COM_RevokeAllClasses
();
...
...
dlls/ole32/compobj_private.h
View file @
28356337
...
@@ -68,29 +68,30 @@ typedef struct tagXOBJECT {
...
@@ -68,29 +68,30 @@ typedef struct tagXOBJECT {
DWORD
refs
;
/* external reference count */
DWORD
refs
;
/* external reference count */
}
XOBJECT
;
}
XOBJECT
;
/* imported interface */
/* imported interface proxy */
typedef
struct
tagIIF
{
struct
ifproxy
struct
tagIIF
*
next
;
{
struct
list
entry
;
LPVOID
iface
;
/* interface pointer */
LPVOID
iface
;
/* interface pointer */
IID
iid
;
/* interface ID */
IID
iid
;
/* interface ID */
IPID
ipid
;
/* imported interface ID */
IPID
ipid
;
/* imported interface ID */
LPRPCPROXYBUFFER
proxy
;
/* interface proxy */
LPRPCPROXYBUFFER
proxy
;
/* interface proxy */
DWORD
refs
;
/* imported (public) references */
DWORD
refs
;
/* imported (public) references */
HRESULT
hres
;
/* result of proxy creation attempt */
};
}
IIF
;
/* imported object */
/* imported object / proxy manager */
typedef
struct
tagIOBJECT
{
struct
proxy_manager
IRemUnknownVtbl
*
lpVtbl
;
{
const
IInternalUnknownVtbl
*
lpVtbl
;
struct
tagAPARTMENT
*
parent
;
struct
tagAPARTMENT
*
parent
;
struct
tagIOBJECT
*
next
;
struct
list
entry
;
LPRPCCHANNELBUFFER
chan
;
/* channel to object */
LPRPCCHANNELBUFFER
chan
;
/* channel to object */
OXID
oxid
;
/* object exported ID */
OXID
oxid
;
/* object exported ID */
OID
oid
;
/* object ID */
OID
oid
;
/* object ID */
IPID
ipid
;
/* first imported interface ID */
struct
list
interfaces
;
/* imported interfaces */
IIF
*
ifaces
;
/* imported interfaces */
DWORD
refs
;
/* proxy reference count */
DWORD
refs
;
/* proxy reference count */
}
IOBJECT
;
CRITICAL_SECTION
cs
;
/* thread safety for this object and children */
};
/* apartment */
/* apartment */
typedef
struct
tagAPARTMENT
{
typedef
struct
tagAPARTMENT
{
...
@@ -105,7 +106,7 @@ typedef struct tagAPARTMENT {
...
@@ -105,7 +106,7 @@ typedef struct tagAPARTMENT {
CRITICAL_SECTION
cs
;
/* thread safety */
CRITICAL_SECTION
cs
;
/* thread safety */
LPMESSAGEFILTER
filter
;
/* message filter */
LPMESSAGEFILTER
filter
;
/* message filter */
XOBJECT
*
objs
;
/* exported objects */
XOBJECT
*
objs
;
/* exported objects */
IOBJECT
*
proxies
;
/* imported objects */
struct
list
proxies
;
/* imported objects */
LPUNKNOWN
state
;
/* state object (see Co[Get,Set]State) */
LPUNKNOWN
state
;
/* state object (see Co[Get,Set]State) */
LPVOID
ErrorInfo
;
/* thread error info */
LPVOID
ErrorInfo
;
/* thread error info */
DWORD
listenertid
;
/* id of apartment_listener_thread */
DWORD
listenertid
;
/* id of apartment_listener_thread */
...
@@ -139,7 +140,7 @@ MARSHAL_Compare_Mids(wine_marshal_id *mid1,wine_marshal_id *mid2) {
...
@@ -139,7 +140,7 @@ MARSHAL_Compare_Mids(wine_marshal_id *mid1,wine_marshal_id *mid2) {
;
;
}
}
HRESULT
MARSHAL_Disconnect_Proxies
(
void
);
HRESULT
MARSHAL_Disconnect_Proxies
(
APARTMENT
*
apt
);
HRESULT
MARSHAL_GetStandardMarshalCF
(
LPVOID
*
ppv
);
HRESULT
MARSHAL_GetStandardMarshalCF
(
LPVOID
*
ppv
);
/* an interface stub */
/* an interface stub */
...
...
dlls/ole32/marshal.c
View file @
28356337
This diff is collapsed.
Click to expand it.
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