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
d17e760c
Commit
d17e760c
authored
Jul 06, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Standardize COM aggregation for the DataCache.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
08e571cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
45 deletions
+22
-45
datacache.c
dlls/ole32/datacache.c
+22
-45
No files found.
dlls/ole32/datacache.c
View file @
d17e760c
...
...
@@ -131,8 +131,8 @@ struct DataCache
/*
* List all interface here
*/
IUnknown
IUnknown_inner
;
IDataObject
IDataObject_iface
;
IUnknown
IUnknown_iface
;
IPersistStorage
IPersistStorage_iface
;
IViewObject2
IViewObject2_iface
;
IOleCache2
IOleCache2_iface
;
...
...
@@ -150,7 +150,7 @@ struct DataCache
/*
* IUnknown implementation of the outer object.
*/
IUnknown
*
outerUnknown
;
IUnknown
*
outer_unk
;
/*
* The user of this object can setup ONE advise sink
...
...
@@ -188,7 +188,7 @@ static inline DataCache *impl_from_IDataObject( IDataObject *iface )
static
inline
DataCache
*
impl_from_IUnknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
DataCache
,
IUnknown_i
face
);
return
CONTAINING_RECORD
(
iface
,
DataCache
,
IUnknown_i
nner
);
}
static
inline
DataCache
*
impl_from_IPersistStorage
(
IPersistStorage
*
iface
)
...
...
@@ -970,7 +970,7 @@ static HRESULT WINAPI DataCache_IDataObject_QueryInterface(
{
DataCache
*
this
=
impl_from_IDataObject
(
iface
);
return
IUnknown_QueryInterface
(
this
->
outer
Unknown
,
riid
,
ppvObject
);
return
IUnknown_QueryInterface
(
this
->
outer
_unk
,
riid
,
ppvObject
);
}
/************************************************************************
...
...
@@ -981,7 +981,7 @@ static ULONG WINAPI DataCache_IDataObject_AddRef(
{
DataCache
*
this
=
impl_from_IDataObject
(
iface
);
return
IUnknown_AddRef
(
this
->
outer
Unknown
);
return
IUnknown_AddRef
(
this
->
outer
_unk
);
}
/************************************************************************
...
...
@@ -992,7 +992,7 @@ static ULONG WINAPI DataCache_IDataObject_Release(
{
DataCache
*
this
=
impl_from_IDataObject
(
iface
);
return
IUnknown_Release
(
this
->
outer
Unknown
);
return
IUnknown_Release
(
this
->
outer
_unk
);
}
/************************************************************************
...
...
@@ -1150,7 +1150,7 @@ static HRESULT WINAPI DataCache_IPersistStorage_QueryInterface(
{
DataCache
*
this
=
impl_from_IPersistStorage
(
iface
);
return
IUnknown_QueryInterface
(
this
->
outer
Unknown
,
riid
,
ppvObject
);
return
IUnknown_QueryInterface
(
this
->
outer
_unk
,
riid
,
ppvObject
);
}
/************************************************************************
...
...
@@ -1161,7 +1161,7 @@ static ULONG WINAPI DataCache_IPersistStorage_AddRef(
{
DataCache
*
this
=
impl_from_IPersistStorage
(
iface
);
return
IUnknown_AddRef
(
this
->
outer
Unknown
);
return
IUnknown_AddRef
(
this
->
outer
_unk
);
}
/************************************************************************
...
...
@@ -1172,7 +1172,7 @@ static ULONG WINAPI DataCache_IPersistStorage_Release(
{
DataCache
*
this
=
impl_from_IPersistStorage
(
iface
);
return
IUnknown_Release
(
this
->
outer
Unknown
);
return
IUnknown_Release
(
this
->
outer
_unk
);
}
/************************************************************************
...
...
@@ -1511,7 +1511,7 @@ static HRESULT WINAPI DataCache_IViewObject2_QueryInterface(
{
DataCache
*
this
=
impl_from_IViewObject2
(
iface
);
return
IUnknown_QueryInterface
(
this
->
outer
Unknown
,
riid
,
ppvObject
);
return
IUnknown_QueryInterface
(
this
->
outer
_unk
,
riid
,
ppvObject
);
}
/************************************************************************
...
...
@@ -1522,7 +1522,7 @@ static ULONG WINAPI DataCache_IViewObject2_AddRef(
{
DataCache
*
this
=
impl_from_IViewObject2
(
iface
);
return
IUnknown_AddRef
(
this
->
outer
Unknown
);
return
IUnknown_AddRef
(
this
->
outer
_unk
);
}
/************************************************************************
...
...
@@ -1533,7 +1533,7 @@ static ULONG WINAPI DataCache_IViewObject2_Release(
{
DataCache
*
this
=
impl_from_IViewObject2
(
iface
);
return
IUnknown_Release
(
this
->
outer
Unknown
);
return
IUnknown_Release
(
this
->
outer
_unk
);
}
/************************************************************************
...
...
@@ -1935,7 +1935,7 @@ static HRESULT WINAPI DataCache_IOleCache2_QueryInterface(
{
DataCache
*
this
=
impl_from_IOleCache2
(
iface
);
return
IUnknown_QueryInterface
(
this
->
outer
Unknown
,
riid
,
ppvObject
);
return
IUnknown_QueryInterface
(
this
->
outer
_unk
,
riid
,
ppvObject
);
}
/************************************************************************
...
...
@@ -1946,7 +1946,7 @@ static ULONG WINAPI DataCache_IOleCache2_AddRef(
{
DataCache
*
this
=
impl_from_IOleCache2
(
iface
);
return
IUnknown_AddRef
(
this
->
outer
Unknown
);
return
IUnknown_AddRef
(
this
->
outer
_unk
);
}
/************************************************************************
...
...
@@ -1957,7 +1957,7 @@ static ULONG WINAPI DataCache_IOleCache2_Release(
{
DataCache
*
this
=
impl_from_IOleCache2
(
iface
);
return
IUnknown_Release
(
this
->
outer
Unknown
);
return
IUnknown_Release
(
this
->
outer
_unk
);
}
/*****************************************************************************
...
...
@@ -2134,7 +2134,7 @@ static HRESULT WINAPI DataCache_IOleCacheControl_QueryInterface(
{
DataCache
*
this
=
impl_from_IOleCacheControl
(
iface
);
return
IUnknown_QueryInterface
(
this
->
outer
Unknown
,
riid
,
ppvObject
);
return
IUnknown_QueryInterface
(
this
->
outer
_unk
,
riid
,
ppvObject
);
}
/************************************************************************
...
...
@@ -2145,7 +2145,7 @@ static ULONG WINAPI DataCache_IOleCacheControl_AddRef(
{
DataCache
*
this
=
impl_from_IOleCacheControl
(
iface
);
return
IUnknown_AddRef
(
this
->
outer
Unknown
);
return
IUnknown_AddRef
(
this
->
outer
_unk
);
}
/************************************************************************
...
...
@@ -2156,7 +2156,7 @@ static ULONG WINAPI DataCache_IOleCacheControl_Release(
{
DataCache
*
this
=
impl_from_IOleCacheControl
(
iface
);
return
IUnknown_Release
(
this
->
outer
Unknown
);
return
IUnknown_Release
(
this
->
outer
_unk
);
}
/************************************************************************
...
...
@@ -2378,31 +2378,16 @@ static DataCache* DataCache_Construct(
* Initialize the virtual function table.
*/
newObject
->
IDataObject_iface
.
lpVtbl
=
&
DataCache_IDataObject_VTable
;
newObject
->
IUnknown_i
face
.
lpVtbl
=
&
DataCache_NDIUnknown_VTable
;
newObject
->
IUnknown_i
nner
.
lpVtbl
=
&
DataCache_NDIUnknown_VTable
;
newObject
->
IPersistStorage_iface
.
lpVtbl
=
&
DataCache_IPersistStorage_VTable
;
newObject
->
IViewObject2_iface
.
lpVtbl
=
&
DataCache_IViewObject2_VTable
;
newObject
->
IOleCache2_iface
.
lpVtbl
=
&
DataCache_IOleCache2_VTable
;
newObject
->
IOleCacheControl_iface
.
lpVtbl
=
&
DataCache_IOleCacheControl_VTable
;
newObject
->
IAdviseSink_iface
.
lpVtbl
=
&
DataCache_IAdviseSink_VTable
;
/*
* Start with one reference count. The caller of this function
* must release the interface pointer when it is done.
*/
newObject
->
outer_unk
=
pUnkOuter
?
pUnkOuter
:
&
newObject
->
IUnknown_inner
;
newObject
->
ref
=
1
;
/*
* Initialize the outer unknown
* We don't keep a reference on the outer unknown since, the way
* aggregation works, our lifetime is at least as large as its
* lifetime.
*/
if
(
pUnkOuter
==
NULL
)
pUnkOuter
=
&
newObject
->
IUnknown_iface
;
newObject
->
outerUnknown
=
pUnkOuter
;
/*
* Initialize the other members of the structure.
*/
newObject
->
sinkAspects
=
0
;
...
...
@@ -2475,16 +2460,8 @@ HRESULT WINAPI CreateDataCache(
if
(
newCache
==
0
)
return
E_OUTOFMEMORY
;
/*
* Make sure it supports the interface required by the caller.
*/
hr
=
IUnknown_QueryInterface
(
&
newCache
->
IUnknown_iface
,
riid
,
ppvObj
);
/*
* Release the reference obtained in the constructor. If
* the QueryInterface was unsuccessful, it will free the class.
*/
IUnknown_Release
(
&
newCache
->
IUnknown_iface
);
hr
=
IUnknown_QueryInterface
(
&
newCache
->
IUnknown_inner
,
riid
,
ppvObj
);
IUnknown_Release
(
&
newCache
->
IUnknown_inner
);
return
hr
;
}
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