Michael Stefaniuc : dmusic: Use generic "unimplemented" methods for IPersistStream.

Alexandre Julliard julliard at winehq.org
Fri Jun 13 10:10:36 CDT 2014


Module: wine
Branch: master
Commit: 4e81a977c7601ae5542bb0084a72b44a891bff57
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4e81a977c7601ae5542bb0084a72b44a891bff57

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Thu Jun 12 11:12:28 2014 +0200

dmusic: Use generic "unimplemented" methods for IPersistStream.

---

 dlls/dmusic/collection.c |   28 ++++------------------------
 dlls/dmusic/dmobject.c   |   26 ++++++++++++++++++++++++++
 dlls/dmusic/dmobject.h   |    9 +++++++++
 3 files changed, 39 insertions(+), 24 deletions(-)

diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c
index 9c6f357..c7084db 100644
--- a/dlls/dmusic/collection.c
+++ b/dlls/dmusic/collection.c
@@ -390,16 +390,6 @@ static const IDirectMusicObjectVtbl dmobject_vtbl = {
 };
 
 /* IDirectMusicCollectionImpl IPersistStream part: */
-static HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_GetClassID(LPPERSISTSTREAM iface, CLSID* pClassID)
-{
-    return E_NOTIMPL;
-}
-
-static HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_IsDirty(LPPERSISTSTREAM iface)
-{
-    return S_FALSE;
-}
-
 static HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_Load(LPPERSISTSTREAM iface, IStream* stream)
 {
     IDirectMusicCollectionImpl *This = impl_from_IPersistStream(iface);
@@ -703,25 +693,15 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_Load(LPPERSISTST
     return S_OK;
 }
 
-static HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_Save(LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty)
-{
-    return E_NOTIMPL;
-}
-
-static HRESULT WINAPI IDirectMusicCollectionImpl_IPersistStream_GetSizeMax(LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize)
-{
-    return E_NOTIMPL;
-}
-
 static const IPersistStreamVtbl persiststream_vtbl = {
     dmobj_IPersistStream_QueryInterface,
     dmobj_IPersistStream_AddRef,
     dmobj_IPersistStream_Release,
-	IDirectMusicCollectionImpl_IPersistStream_GetClassID,
-	IDirectMusicCollectionImpl_IPersistStream_IsDirty,
+    unimpl_IPersistStream_GetClassID,
+    unimpl_IPersistStream_IsDirty,
 	IDirectMusicCollectionImpl_IPersistStream_Load,
-	IDirectMusicCollectionImpl_IPersistStream_Save,
-	IDirectMusicCollectionImpl_IPersistStream_GetSizeMax
+    unimpl_IPersistStream_Save,
+    unimpl_IPersistStream_GetSizeMax
 };
 
 
diff --git a/dlls/dmusic/dmobject.c b/dlls/dmusic/dmobject.c
index f6c83a0..4afd5b9 100644
--- a/dlls/dmusic/dmobject.c
+++ b/dlls/dmusic/dmobject.c
@@ -134,6 +134,32 @@ ULONG WINAPI dmobj_IPersistStream_Release(IPersistStream *iface)
     return IUnknown_Release(This->outer_unk);
 }
 
+/* IPersistStream methods not implemented in native */
+HRESULT WINAPI unimpl_IPersistStream_GetClassID(IPersistStream *iface, CLSID *class)
+{
+    TRACE("(%p, %p): method not implemented\n", iface, class);
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI unimpl_IPersistStream_IsDirty(IPersistStream *iface)
+{
+    TRACE("(%p): method not implemented, always returning S_FALSE\n", iface);
+    return S_FALSE;
+}
+
+HRESULT WINAPI unimpl_IPersistStream_Save(IPersistStream *iface, IStream *stream,
+        BOOL clear_dirty)
+{
+    TRACE("(%p, %p, %d): method not implemented\n", iface, stream, clear_dirty);
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI unimpl_IPersistStream_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *size)
+{
+    TRACE("(%p, %p): method not implemented\n", iface, size);
+    return E_NOTIMPL;
+}
+
 
 void dmobject_init(struct dmobject *dmobj, const GUID *class, IUnknown *outer_unk)
 {
diff --git a/dlls/dmusic/dmobject.h b/dlls/dmusic/dmobject.h
index 1a09a0b..3574939 100644
--- a/dlls/dmusic/dmobject.h
+++ b/dlls/dmusic/dmobject.h
@@ -42,3 +42,12 @@ HRESULT WINAPI dmobj_IPersistStream_QueryInterface(IPersistStream *iface, REFIID
         void **ret_iface) DECLSPEC_HIDDEN;
 ULONG WINAPI dmobj_IPersistStream_AddRef(IPersistStream *iface) DECLSPEC_HIDDEN;
 ULONG WINAPI dmobj_IPersistStream_Release(IPersistStream *iface) DECLSPEC_HIDDEN;
+
+/* IPersistStream methods not implemented in native */
+HRESULT WINAPI unimpl_IPersistStream_GetClassID(IPersistStream *iface,
+        CLSID *class) DECLSPEC_HIDDEN;
+HRESULT WINAPI unimpl_IPersistStream_IsDirty(IPersistStream *iface) DECLSPEC_HIDDEN;
+HRESULT WINAPI unimpl_IPersistStream_Save(IPersistStream *iface, IStream *stream,
+        BOOL clear_dirty) DECLSPEC_HIDDEN;
+HRESULT WINAPI unimpl_IPersistStream_GetSizeMax(IPersistStream *iface,
+        ULARGE_INTEGER *size) DECLSPEC_HIDDEN;




More information about the wine-cvs mailing list