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.
24 #include "wine/debug.h"
26 #include "dmscript_private.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
30 /* IDirectMusicScript IUnknown parts follow: */
31 HRESULT WINAPI IDirectMusicScriptImpl_QueryInterface (LPDIRECTMUSICSCRIPT iface, REFIID riid, LPVOID *ppobj)
33 ICOM_THIS(IDirectMusicScriptImpl,iface);
35 if (IsEqualGUID(riid, &IID_IUnknown) ||
36 IsEqualGUID(riid, &IID_IDirectMusicScript))
38 IDirectMusicScriptImpl_AddRef(iface);
42 WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
46 ULONG WINAPI IDirectMusicScriptImpl_AddRef (LPDIRECTMUSICSCRIPT iface)
48 ICOM_THIS(IDirectMusicScriptImpl,iface);
49 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
53 ULONG WINAPI IDirectMusicScriptImpl_Release (LPDIRECTMUSICSCRIPT iface)
55 ICOM_THIS(IDirectMusicScriptImpl,iface);
56 ULONG ref = --This->ref;
57 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
60 HeapFree(GetProcessHeap(), 0, This);
65 /* IDirectMusicScript Interface follow: */
66 HRESULT WINAPI IDirectMusicScriptImpl_Init (LPDIRECTMUSICSCRIPT iface, IDirectMusicPerformance* pPerformance, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
68 ICOM_THIS(IDirectMusicScriptImpl,iface);
70 FIXME("(%p, %p, %p): stub\n", This, pPerformance, pErrorInfo);
75 HRESULT WINAPI IDirectMusicScriptImpl_CallRoutine (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszRoutineName, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
77 ICOM_THIS(IDirectMusicScriptImpl,iface);
79 FIXME("(%p, %s, %p): stub\n", This, debugstr_w(pwszRoutineName), pErrorInfo);
84 HRESULT WINAPI IDirectMusicScriptImpl_SetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT varValue, BOOL fSetRef, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
86 ICOM_THIS(IDirectMusicScriptImpl,iface);
88 FIXME("(%p, %p, FIXME, %d, %p): stub\n", This, pwszVariableName,/* varValue,*/ fSetRef, pErrorInfo);
93 HRESULT WINAPI IDirectMusicScriptImpl_GetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT* pvarValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
95 ICOM_THIS(IDirectMusicScriptImpl,iface);
97 FIXME("(%p, %p, %p, %p): stub\n", This, pwszVariableName, pvarValue, pErrorInfo);
102 HRESULT WINAPI IDirectMusicScriptImpl_SetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG lValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
104 ICOM_THIS(IDirectMusicScriptImpl,iface);
106 FIXME("(%p, %p, %li, %p): stub\n", This, pwszVariableName, lValue, pErrorInfo);
111 HRESULT WINAPI IDirectMusicScriptImpl_GetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG* plValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
113 ICOM_THIS(IDirectMusicScriptImpl,iface);
115 FIXME("(%p, %p, %p, %p): stub\n", This, pwszVariableName, plValue, pErrorInfo);
120 HRESULT WINAPI IDirectMusicScriptImpl_SetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, IUnknown* punkValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
122 ICOM_THIS(IDirectMusicScriptImpl,iface);
124 FIXME("(%p, %p, %p, %p): stub\n", This, pwszVariableName, punkValue, pErrorInfo);
129 HRESULT WINAPI IDirectMusicScriptImpl_GetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, REFIID riid, LPVOID* ppv, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
131 ICOM_THIS(IDirectMusicScriptImpl,iface);
133 FIXME("(%p, %p, %s, %p, %p): stub\n", This, pwszVariableName, debugstr_guid(riid), ppv, pErrorInfo);
138 HRESULT WINAPI IDirectMusicScriptImpl_EnumRoutine (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName)
140 ICOM_THIS(IDirectMusicScriptImpl,iface);
142 FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
147 HRESULT WINAPI IDirectMusicScriptImpl_EnumVariable (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName)
149 ICOM_THIS(IDirectMusicScriptImpl,iface);
151 FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
156 ICOM_VTABLE(IDirectMusicScript) DirectMusicScript_Vtbl =
158 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
159 IDirectMusicScriptImpl_QueryInterface,
160 IDirectMusicScriptImpl_AddRef,
161 IDirectMusicScriptImpl_Release,
162 IDirectMusicScriptImpl_Init,
163 IDirectMusicScriptImpl_CallRoutine,
164 IDirectMusicScriptImpl_SetVariableVariant,
165 IDirectMusicScriptImpl_GetVariableVariant,
166 IDirectMusicScriptImpl_SetVariableNumber,
167 IDirectMusicScriptImpl_GetVariableNumber,
168 IDirectMusicScriptImpl_SetVariableObject,
169 IDirectMusicScriptImpl_GetVariableObject,
170 IDirectMusicScriptImpl_EnumRoutine,
171 IDirectMusicScriptImpl_EnumVariable
174 /* for ClassFactory */
175 HRESULT WINAPI DMUSIC_CreateDirectMusicScript (LPCGUID lpcGUID, LPDIRECTMUSICSCRIPT* ppDMScript, LPUNKNOWN pUnkOuter)
177 if (IsEqualGUID (lpcGUID, &IID_IDirectMusicScript))
180 return E_NOINTERFACE;
182 WARN("No interface found\n");
184 return E_NOINTERFACE;