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)
else
apt
=
NtCurrentTeb
()
->
ReservedForOle
;
list_init
(
&
apt
->
proxies
);
list_init
(
&
apt
->
stubmgrs
);
apt
->
oidc
=
1
;
...
...
@@ -263,6 +264,14 @@ static void COM_DestroyApartment(APARTMENT *apt)
apt
->
prev
=
NULL
;
apt
->
next
=
NULL
;
LeaveCriticalSection
(
&
csApartment
);
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
);
DeleteCriticalSection
(
&
apt
->
cs
);
}
...
...
@@ -545,14 +554,6 @@ void WINAPI CoUninitialize(void)
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 */
COM_RevokeAllClasses
();
...
...
dlls/ole32/compobj_private.h
View file @
28356337
...
...
@@ -68,29 +68,30 @@ typedef struct tagXOBJECT {
DWORD
refs
;
/* external reference count */
}
XOBJECT
;
/* imported interface */
typedef
struct
tagIIF
{
struct
tagIIF
*
next
;
/* imported interface proxy */
struct
ifproxy
{
struct
list
entry
;
LPVOID
iface
;
/* interface pointer */
IID
iid
;
/* interface ID */
IPID
ipid
;
/* imported interface ID */
LPRPCPROXYBUFFER
proxy
;
/* interface proxy */
DWORD
refs
;
/* imported (public) references */
HRESULT
hres
;
/* result of proxy creation attempt */
}
IIF
;
};
/* imported object */
typedef
struct
tagIOBJECT
{
IRemUnknownVtbl
*
lpVtbl
;
/* imported object / proxy manager */
struct
proxy_manager
{
const
IInternalUnknownVtbl
*
lpVtbl
;
struct
tagAPARTMENT
*
parent
;
struct
tagIOBJECT
*
next
;
struct
list
entry
;
LPRPCCHANNELBUFFER
chan
;
/* channel to object */
OXID
oxid
;
/* object exported ID */
OID
oid
;
/* object ID */
IPID
ipid
;
/* first imported interface ID */
IIF
*
ifaces
;
/* imported interfaces */
struct
list
interfaces
;
/* imported interfaces */
DWORD
refs
;
/* proxy reference count */
}
IOBJECT
;
CRITICAL_SECTION
cs
;
/* thread safety for this object and children */
};
/* apartment */
typedef
struct
tagAPARTMENT
{
...
...
@@ -105,7 +106,7 @@ typedef struct tagAPARTMENT {
CRITICAL_SECTION
cs
;
/* thread safety */
LPMESSAGEFILTER
filter
;
/* message filter */
XOBJECT
*
objs
;
/* exported objects */
IOBJECT
*
proxies
;
/* imported objects */
struct
list
proxies
;
/* imported objects */
LPUNKNOWN
state
;
/* state object (see Co[Get,Set]State) */
LPVOID
ErrorInfo
;
/* thread error info */
DWORD
listenertid
;
/* id of apartment_listener_thread */
...
...
@@ -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
);
/* 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