From 40769b4fadae605ee5656bab53205aad92c8b355 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 1 Jul 2015 09:29:59 +0200 Subject: [PATCH] dmstyle: Mark IPersistStream_Save() as stub. --- dlls/dmstyle/auditiontrack.c | 14 +++++++++++++- dlls/dmstyle/chordtrack.c | 11 ++++++++--- dlls/dmstyle/commandtrack.c | 9 ++++++++- dlls/dmstyle/mutetrack.c | 14 +++++++++++++- dlls/dmstyle/tests/dmstyle.c | 2 +- 5 files changed, 43 insertions(+), 7 deletions(-) diff --git a/dlls/dmstyle/auditiontrack.c b/dlls/dmstyle/auditiontrack.c index 3239ed731bd..3c304ca574b 100644 --- a/dlls/dmstyle/auditiontrack.c +++ b/dlls/dmstyle/auditiontrack.c @@ -242,6 +242,11 @@ static const IDirectMusicTrack8Vtbl dmtrack8_vtbl = { IDirectMusicTrack8Impl_Join }; +static inline IDirectMusicAuditionTrack * impl_from_IPersistStream(IPersistStream *iface) +{ + return CONTAINING_RECORD(iface, IDirectMusicAuditionTrack, dmobj.IPersistStream_iface); +} + static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *stream) { FIXME(": Loading not implemented yet\n"); @@ -251,7 +256,14 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *st static HRESULT WINAPI IPersistStreamImpl_Save(IPersistStream *iface, IStream *stream, BOOL cleardirty) { - return E_NOTIMPL; + IDirectMusicAuditionTrack *This = impl_from_IPersistStream(iface); + + FIXME("(%p, %p, %d): stub\n", This, stream, cleardirty); + + if (!stream) + return E_POINTER; + + return E_NOTIMPL; } static const IPersistStreamVtbl persiststream_vtbl = { diff --git a/dlls/dmstyle/chordtrack.c b/dlls/dmstyle/chordtrack.c index db4befc82dc..fd290bf7a9e 100644 --- a/dlls/dmstyle/chordtrack.c +++ b/dlls/dmstyle/chordtrack.c @@ -376,9 +376,14 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS static HRESULT WINAPI IPersistStreamImpl_Save(IPersistStream *iface, IStream *stream, BOOL cleardirty) { - IDirectMusicChordTrack *This = impl_from_IPersistStream(iface); - FIXME("(%p): Saving not implemented yet\n", This); - return E_NOTIMPL; + IDirectMusicChordTrack *This = impl_from_IPersistStream(iface); + + FIXME("(%p, %p, %d): stub\n", This, stream, cleardirty); + + if (!stream) + return E_POINTER; + + return E_NOTIMPL; } static const IPersistStreamVtbl persiststream_vtbl = { diff --git a/dlls/dmstyle/commandtrack.c b/dlls/dmstyle/commandtrack.c index 9f798e785ba..e326241c4b2 100644 --- a/dlls/dmstyle/commandtrack.c +++ b/dlls/dmstyle/commandtrack.c @@ -319,7 +319,14 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS static HRESULT WINAPI IPersistStreamImpl_Save(IPersistStream *iface, IStream *stream, BOOL cleardirty) { - return E_NOTIMPL; + IDirectMusicCommandTrack *This = impl_from_IPersistStream(iface); + + FIXME("(%p, %p, %d): stub\n", This, stream, cleardirty); + + if (!stream) + return E_POINTER; + + return E_NOTIMPL; } static const IPersistStreamVtbl persiststream_vtbl = { diff --git a/dlls/dmstyle/mutetrack.c b/dlls/dmstyle/mutetrack.c index c912ee02a32..67bfbc30dc7 100644 --- a/dlls/dmstyle/mutetrack.c +++ b/dlls/dmstyle/mutetrack.c @@ -247,6 +247,11 @@ static const IDirectMusicTrack8Vtbl dmtrack8_vtbl = { IDirectMusicTrack8Impl_Join }; +static inline IDirectMusicMuteTrack * impl_from_IPersistStream(IPersistStream *iface) +{ + return CONTAINING_RECORD(iface, IDirectMusicMuteTrack, dmobj.IPersistStream_iface); +} + static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *stream) { FIXME(": Loading not implemented yet\n"); @@ -256,7 +261,14 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *st static HRESULT WINAPI IPersistStreamImpl_Save(IPersistStream *iface, IStream *stream, BOOL cleardirty) { - return E_NOTIMPL; + IDirectMusicMuteTrack *This = impl_from_IPersistStream(iface); + + FIXME("(%p, %p, %d): stub\n", This, stream, cleardirty); + + if (!stream) + return E_POINTER; + + return E_NOTIMPL; } static const IPersistStreamVtbl persiststream_vtbl = { diff --git a/dlls/dmstyle/tests/dmstyle.c b/dlls/dmstyle/tests/dmstyle.c index 9468c398cfa..2677daa00bc 100644 --- a/dlls/dmstyle/tests/dmstyle.c +++ b/dlls/dmstyle/tests/dmstyle.c @@ -339,7 +339,7 @@ static void test_track(void) hr = IPersistStream_Save(ps, NULL, TRUE); if (class[i].has_save) - todo_wine ok(hr == E_POINTER, "IPersistStream_Save failed: %08x\n", hr); + ok(hr == E_POINTER, "IPersistStream_Save failed: %08x\n", hr); else ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);