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
4d137e47
Commit
4d137e47
authored
Oct 26, 2010
by
Huw Davies
Committed by
Alexandre Julliard
Nov 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add a stub advise sink object to the data cache.
parent
ad326999
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
0 deletions
+81
-0
datacache.c
dlls/ole32/datacache.c
+81
-0
No files found.
dlls/ole32/datacache.c
View file @
4d137e47
...
...
@@ -126,6 +126,10 @@ struct DataCache
const
IOleCache2Vtbl
*
lpvtblIOleCache2
;
const
IOleCacheControlVtbl
*
lpvtblIOleCacheControl
;
/* The sink that is connected to a remote object.
The other interfaces are not available by QI'ing the sink and vice-versa */
const
IAdviseSinkVtbl
*
lpvtblIAdviseSink
;
/*
* Reference count of this object
*/
...
...
@@ -193,6 +197,11 @@ static inline DataCache *impl_from_IOleCacheControl( IOleCacheControl *iface )
return
(
DataCache
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
DataCache
,
lpvtblIOleCacheControl
));
}
static
inline
DataCache
*
impl_from_IAdviseSink
(
IAdviseSink
*
iface
)
{
return
(
DataCache
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
DataCache
,
lpvtblIAdviseSink
));
}
static
const
char
*
debugstr_formatetc
(
const
FORMATETC
*
formatetc
)
{
return
wine_dbg_sprintf
(
"{ cfFormat = 0x%x, ptd = %p, dwAspect = %d, lindex = %d, tymed = %d }"
,
...
...
@@ -2163,6 +2172,64 @@ static HRESULT WINAPI DataCache_OnStop(
return
E_NOTIMPL
;
}
/************************************************************************
* IAdviseSink methods.
* This behaves as an internal object to the data cache. QI'ing its ptr doesn't
* give access to the cache's other interfaces. We don't maintain a ref count,
* the object exists as long as the cache is around.
*/
static
HRESULT
WINAPI
DataCache_IAdviseSink_QueryInterface
(
IAdviseSink
*
iface
,
REFIID
iid
,
void
**
obj
)
{
*
obj
=
NULL
;
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IAdviseSink
,
iid
))
{
*
obj
=
iface
;
}
if
(
*
obj
)
{
IAdviseSink_AddRef
(
iface
);
return
S_OK
;
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
DataCache_IAdviseSink_AddRef
(
IAdviseSink
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
DataCache_IAdviseSink_Release
(
IAdviseSink
*
iface
)
{
return
1
;
}
static
void
WINAPI
DataCache_OnDataChange
(
IAdviseSink
*
iface
,
FORMATETC
*
fmt
,
STGMEDIUM
*
med
)
{
FIXME
(
"stub
\n
"
);
}
static
void
WINAPI
DataCache_OnViewChange
(
IAdviseSink
*
iface
,
DWORD
aspect
,
LONG
index
)
{
FIXME
(
"stub
\n
"
);
}
static
void
WINAPI
DataCache_OnRename
(
IAdviseSink
*
iface
,
IMoniker
*
mk
)
{
FIXME
(
"stub
\n
"
);
}
static
void
WINAPI
DataCache_OnSave
(
IAdviseSink
*
iface
)
{
FIXME
(
"stub
\n
"
);
}
static
void
WINAPI
DataCache_OnClose
(
IAdviseSink
*
iface
)
{
FIXME
(
"stub
\n
"
);
}
/*
* Virtual function tables for the DataCache class.
*/
...
...
@@ -2240,6 +2307,19 @@ static const IOleCacheControlVtbl DataCache_IOleCacheControl_VTable =
DataCache_OnStop
};
static
const
IAdviseSinkVtbl
DataCache_IAdviseSink_VTable
=
{
DataCache_IAdviseSink_QueryInterface
,
DataCache_IAdviseSink_AddRef
,
DataCache_IAdviseSink_Release
,
DataCache_OnDataChange
,
DataCache_OnViewChange
,
DataCache_OnRename
,
DataCache_OnSave
,
DataCache_OnClose
};
/******************************************************************************
* CreateDataCache [OLE32.@]
*
...
...
@@ -2338,6 +2418,7 @@ static DataCache* DataCache_Construct(
newObject
->
lpvtblIViewObject
=
&
DataCache_IViewObject2_VTable
;
newObject
->
lpvtblIOleCache2
=
&
DataCache_IOleCache2_VTable
;
newObject
->
lpvtblIOleCacheControl
=
&
DataCache_IOleCacheControl_VTable
;
newObject
->
lpvtblIAdviseSink
=
&
DataCache_IAdviseSink_VTable
;
/*
* Start with one reference count. The caller of this function
...
...
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