Regression fixes for Nt{Read|Write}File:
[wine/multimedia.git] / dlls / dmime / segmentstate.c
blob2e01ebbdc74918c96d76635c2a9e6003e8ee2efa
1 /* IDirectMusicSegmentState8 Implementation
3 * Copyright (C) 2003 Rok Mandeljc
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #include "windef.h"
21 #include "winbase.h"
22 #include "winuser.h"
23 #include "wingdi.h"
24 #include "wine/debug.h"
26 #include "dmime_private.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
31 /* IDirectMusicSegmentState8 IUnknown part follow: */
32 HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface, REFIID riid, LPVOID *ppobj)
34 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
36 if (IsEqualGUID(riid, &IID_IUnknown) ||
37 IsEqualGUID(riid, &IID_IDirectMusicSegmentState) ||
38 IsEqualGUID(riid, &IID_IDirectMusicSegmentState8))
40 IDirectMusicSegmentState8Impl_AddRef(iface);
41 *ppobj = This;
42 return S_OK;
44 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
45 return E_NOINTERFACE;
48 ULONG WINAPI IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface)
50 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
51 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
52 return ++(This->ref);
55 ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface)
57 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
58 ULONG ref = --This->ref;
59 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
60 if (ref == 0)
62 HeapFree(GetProcessHeap(), 0, This);
64 return ref;
67 /* IDirectMusicSegmentState Interface part follow: */
68 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD* pdwRepeats)
70 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
72 FIXME("(%p, %p): stub\n", This, pdwRepeats);
74 return S_OK;
77 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface, IDirectMusicSegment** ppSegment)
79 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
81 FIXME("(%p, %p): stub\n", This, ppSegment);
83 return S_OK;
86 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
88 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
90 FIXME("(%p, %p): stub\n", This, pmtStart);
92 return S_OK;
95 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtSeek)
97 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
99 FIXME("(%p, %p): stub\n", This, pmtSeek);
101 return S_OK;
104 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
106 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
108 FIXME("(%p, %p): stub\n", This, pmtStart);
110 return S_OK;
113 /* IDirectMusicSegmentState8 Interface part follow: */
114 HRESULT WINAPI IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff)
116 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
118 FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This, debugstr_guid(rguidTrackClassID), dwGroupBits, dwIndex, dwFlagsOn, dwFlagsOff);
120 return S_OK;
123 HRESULT WINAPI IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void** ppObject)
125 ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
127 FIXME("(%p, %ld, %ld, %ld, %s, %ld, %s, %p): stub\n", This, dwPChannel, dwStage, dwBuffer, debugstr_guid(guidObject), dwIndex, debugstr_guid(iidInterface), ppObject);
129 return S_OK;
132 ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl =
134 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
135 IDirectMusicSegmentState8Impl_QueryInterface,
136 IDirectMusicSegmentState8Impl_AddRef,
137 IDirectMusicSegmentState8Impl_Release,
138 IDirectMusicSegmentState8Impl_GetRepeats,
139 IDirectMusicSegmentState8Impl_GetSegment,
140 IDirectMusicSegmentState8Impl_GetStartTime,
141 IDirectMusicSegmentState8Impl_GetSeek,
142 IDirectMusicSegmentState8Impl_GetStartPoint,
143 IDirectMusicSegmentState8Impl_SetTrackConfig,
144 IDirectMusicSegmentState8Impl_GetObjectInPath
147 /* for ClassFactory */
148 HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentState (LPCGUID lpcGUID, LPDIRECTMUSICSEGMENTSTATE8 *ppDMSeg, LPUNKNOWN pUnkOuter)
150 if (IsEqualGUID (lpcGUID, &IID_IDirectMusicComposer))
152 FIXME("Not yet\n");
153 return E_NOINTERFACE;
155 WARN("No interface found\n");
157 return E_NOINTERFACE;