1 /* IDirectMusicGetLoader 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.
24 #include "wine/debug.h"
25 #include "wine/unicode.h"
27 #include "dmloader_private.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(dmusic
);
31 /* IDirectMusicGetLoader IUnknown parts follow: */
32 HRESULT WINAPI
IDirectMusicGetLoaderImpl_QueryInterface (LPDIRECTMUSICGETLOADER iface
, REFIID riid
, LPVOID
*ppobj
)
34 ICOM_THIS(IDirectMusicGetLoaderImpl
,iface
);
36 if (IsEqualGUID(riid
, &IID_IUnknown
) ||
37 IsEqualGUID(riid
, &IID_IDirectMusicGetLoader
))
39 IDirectMusicGetLoaderImpl_AddRef(iface
);
43 WARN("(%p)->(%s,%p),not found\n",This
,debugstr_guid(riid
),ppobj
);
47 ULONG WINAPI
IDirectMusicGetLoaderImpl_AddRef (LPDIRECTMUSICGETLOADER iface
)
49 ICOM_THIS(IDirectMusicGetLoaderImpl
,iface
);
50 TRACE("(%p) : AddRef from %ld\n", This
, This
->ref
);
54 ULONG WINAPI
IDirectMusicGetLoaderImpl_Release (LPDIRECTMUSICGETLOADER iface
)
56 ICOM_THIS(IDirectMusicGetLoaderImpl
,iface
);
57 ULONG ref
= --This
->ref
;
58 TRACE("(%p) : ReleaseRef to %ld\n", This
, This
->ref
);
61 HeapFree(GetProcessHeap(), 0, This
);
66 /* IDirectMusicGetLoader Interface follow: */
67 HRESULT WINAPI
IDirectMusicGetLoaderImpl_GetLoader (LPDIRECTMUSICGETLOADER iface
, IDirectMusicLoader
** ppLoader
)
69 ICOM_THIS(IDirectMusicGetLoaderImpl
,iface
);
71 FIXME("(%p, %p): stub\n", This
, ppLoader
);
76 ICOM_VTABLE(IDirectMusicGetLoader
) DirectMusicGetLoader_Vtbl
=
78 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
79 IDirectMusicGetLoaderImpl_QueryInterface
,
80 IDirectMusicGetLoaderImpl_AddRef
,
81 IDirectMusicGetLoaderImpl_Release
,
82 IDirectMusicGetLoaderImpl_GetLoader
85 /* for ClassFactory */
86 HRESULT WINAPI
DMUSIC_CreateDirectMusicGetLoader (LPCGUID lpcGUID
, LPDIRECTMUSICGETLOADER
*ppDMGetLoad
, LPUNKNOWN pUnkOuter
)
88 if (IsEqualGUID (lpcGUID
, &IID_IDirectMusicGetLoader
))
93 WARN("No interface found\n");