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
dee74a6e
Commit
dee74a6e
authored
Jan 04, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 04, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the ClassFactory proxy support aggregation.
parent
75f87dd4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
oleproxy.c
dlls/ole32/oleproxy.c
+20
-7
No files found.
dlls/ole32/oleproxy.c
View file @
dee74a6e
...
...
@@ -270,6 +270,7 @@ typedef struct _CFProxy {
DWORD
ref
;
IRpcChannelBuffer
*
chanbuf
;
IUnknown
*
outer_unknown
;
}
CFProxy
;
static
HRESULT
WINAPI
IRpcProxyBufferImpl_QueryInterface
(
LPRPCPROXYBUFFER
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
...
...
@@ -316,6 +317,8 @@ static void WINAPI IRpcProxyBufferImpl_Disconnect(LPRPCPROXYBUFFER iface) {
static
HRESULT
WINAPI
CFProxy_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
ICOM_THIS_MULTI
(
CFProxy
,
lpvtbl_proxy
,
iface
);
if
(
This
->
outer_unknown
)
return
IUnknown_QueryInterface
(
This
->
outer_unknown
,
riid
,
ppv
);
*
ppv
=
NULL
;
if
(
IsEqualIID
(
&
IID_IClassFactory
,
riid
)
||
IsEqualIID
(
&
IID_IUnknown
,
riid
))
{
*
ppv
=
(
LPVOID
)
iface
;
...
...
@@ -330,15 +333,22 @@ CFProxy_QueryInterface(LPCLASSFACTORY iface,REFIID riid, LPVOID *ppv) {
static
ULONG
WINAPI
CFProxy_AddRef
(
LPCLASSFACTORY
iface
)
{
ICOM_THIS_MULTI
(
CFProxy
,
lpvtbl_cf
,
iface
);
if
(
This
->
outer_unknown
)
return
IUnknown_AddRef
(
This
->
outer_unknown
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
CFProxy_Release
(
LPCLASSFACTORY
iface
)
{
ULONG
ref
;
ICOM_THIS_MULTI
(
CFProxy
,
lpvtbl_cf
,
iface
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
ref
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
if
(
This
->
outer_unknown
)
ref
=
IUnknown_Release
(
This
->
outer_unknown
);
else
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
ref
)
{
IRpcChannelBuffer_Release
(
This
->
chanbuf
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
...
...
@@ -424,7 +434,7 @@ static IClassFactoryVtbl cfproxyvt = {
};
static
HRESULT
CFProxy_Construct
(
LPVOID
*
ppv
,
LPVOID
*
ppProxy
)
{
CFProxy_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
,
LPVOID
*
ppProxy
)
{
CFProxy
*
cf
;
cf
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
CFProxy
));
...
...
@@ -433,10 +443,13 @@ CFProxy_Construct(LPVOID *ppv,LPVOID *ppProxy) {
cf
->
lpvtbl_cf
=
&
cfproxyvt
;
cf
->
lpvtbl_proxy
=
&
pspbvtbl
;
/* 1 reference for the proxy and 1 for the object */
cf
->
ref
=
2
;
/* 1 reference for the proxy... */
cf
->
ref
=
1
;
cf
->
outer_unknown
=
pUnkOuter
;
*
ppv
=
&
(
cf
->
lpvtbl_cf
);
*
ppProxy
=
&
(
cf
->
lpvtbl_proxy
);
/* ...and 1 for the object */
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
...
...
@@ -464,7 +477,7 @@ PSFacBuf_CreateProxy(
if
(
IsEqualIID
(
&
IID_IClassFactory
,
riid
)
||
IsEqualIID
(
&
IID_IUnknown
,
riid
)
)
return
CFProxy_Construct
(
ppv
,(
LPVOID
*
)
ppProxy
);
return
CFProxy_Construct
(
p
UnkOuter
,
p
pv
,(
LPVOID
*
)
ppProxy
);
FIXME
(
"proxying not implemented for (%s) yet!
\n
"
,
debugstr_guid
(
riid
));
return
E_FAIL
;
}
...
...
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