Commit 473c5657 authored by Rok Mandeljc's avatar Rok Mandeljc Committed by Alexandre Julliard

Split the dmusic interfaces.

parent bb40b306
...@@ -3,13 +3,16 @@ TOPOBJDIR = ../.. ...@@ -3,13 +3,16 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = dmband.dll MODULE = dmband.dll
IMPORTS = dmusic kernel32 IMPORTS = ole32 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
dmband_main.c band.c \
dmband_main.c \
regsvr.c
RC_SRCS = version.rc RC_SRCS = version.rc
......
/* IDirectMusicBand Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmband_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicBand IUnknown parts follow: */
HRESULT WINAPI IDirectMusicBandImpl_QueryInterface (LPDIRECTMUSICBAND iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicBandImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicBand))
{
IDirectMusicBandImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicBandImpl_AddRef (LPDIRECTMUSICBAND iface)
{
ICOM_THIS(IDirectMusicBandImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicBandImpl_Release (LPDIRECTMUSICBAND iface)
{
ICOM_THIS(IDirectMusicBandImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicBand Interface follow: */
HRESULT WINAPI IDirectMusicBandImpl_CreateSegment (LPDIRECTMUSICBAND iface, IDirectMusicSegment** ppSegment)
{
ICOM_THIS(IDirectMusicBandImpl,iface);
FIXME("(%p, %p): stub\n", This, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicBandImpl_Download (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance)
{
ICOM_THIS(IDirectMusicBandImpl,iface);
FIXME("(%p, %p): stub\n", This, pPerformance);
return S_OK;
}
HRESULT WINAPI IDirectMusicBandImpl_Unload (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance)
{
ICOM_THIS(IDirectMusicBandImpl,iface);
FIXME("(%p, %p): stub\n", This, pPerformance);
return S_OK;
}
ICOM_VTABLE(IDirectMusicBand) DirectMusicBand_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicBandImpl_QueryInterface,
IDirectMusicBandImpl_AddRef,
IDirectMusicBandImpl_Release,
IDirectMusicBandImpl_CreateSegment,
IDirectMusicBandImpl_Download,
IDirectMusicBandImpl_Unload
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicBand (LPCGUID lpcGUID, LPDIRECTMUSICBAND* ppDMBand, LPUNKNOWN pUnkOuter)
{
IDirectMusicBandImpl* dmband;
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicBand))
{
dmband = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandImpl));
if (NULL == dmband) {
*ppDMBand = (LPDIRECTMUSICBAND) NULL;
return E_OUTOFMEMORY;
}
dmband->lpVtbl = &DirectMusicBand_Vtbl;
dmband->ref = 1;
*ppDMBand = (LPDIRECTMUSICBAND) dmband;
return S_OK;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
# Linked to main dmusic.dll for easier implementation 1 stdcall DllCanUnloadNow() DMBAND_DllCanUnloadNow
2 stdcall DllGetClassObject(long long ptr) DMBAND_DllGetClassObject
1 stdcall DllCanUnloadNow() dmusic.DllCanUnloadNow 3 stdcall DllRegisterServer() DMBAND_DllRegisterServer
2 stdcall DllGetClassObject(long long ptr) dmusic.DllGetClassObject 4 stdcall DllUnregisterServer() DMBAND_DllUnregisterServer
3 stdcall DllRegisterServer() dmusic.DllRegisterServer
4 stdcall DllUnregisterServer() dmusic.DllUnregisterServer
/* nothing here yet */ /* DirectMusicBand Main
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "dmband_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/******************************************************************
* DirectMusicBand ClassFactory
*
*
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
static HRESULT WINAPI DMBCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI DMBCF_AddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DMBCF_Release(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI DMBCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualGUID (riid, &IID_IDirectMusicBand)) {
return DMUSIC_CreateDirectMusicBand (riid, (LPDIRECTMUSICBAND*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static HRESULT WINAPI DMBCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) DMBCF_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
DMBCF_QueryInterface,
DMBCF_AddRef,
DMBCF_Release,
DMBCF_CreateInstance,
DMBCF_LockServer
};
static IClassFactoryImpl DMBAND_CF = {&DMBCF_Vtbl, 1 };
/******************************************************************
* DllMain
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */
}
return TRUE;
}
/******************************************************************
* DllCanUnloadNow (DMBAND.1)
*
*
*/
HRESULT WINAPI DMBAND_DllCanUnloadNow(void)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/******************************************************************
* DllGetClassObject (DMBAND.2)
*
*
*/
HRESULT WINAPI DMBAND_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (&IID_IClassFactory, riid)) {
*ppv = (LPVOID) &DMBAND_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
WARN("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/* DirectMusicBand Private Include
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __WINE_DMBAND_PRIVATE_H
#define __WINE_DMBAND_PRIVATE_H
#include "windef.h"
#include "wine/debug.h"
#include "winbase.h"
#include "winnt.h"
#include "dmusicc.h"
#include "dmusici.h"
#include "dmusics.h"
#include "dmplugin.h"
#include "dmusicf.h"
#include "dsound.h"
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicBandImpl IDirectMusicBandImpl;
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(IDirectMusicBand) DirectMusicBand_Vtbl;
/*****************************************************************************
* ClassFactory
* can support IID_IDirectMusicBand
* return always an IDirectMusicBandImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicBand (LPCGUID lpcGUID, LPDIRECTMUSICBAND* ppDMBand, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectMusicBandImpl implementation structure
*/
struct IDirectMusicBandImpl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicBand);
DWORD ref;
/* IDirectMusicBandImpl fields */
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicBandImpl_QueryInterface (LPDIRECTMUSICBAND iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicBandImpl_AddRef (LPDIRECTMUSICBAND iface);
extern ULONG WINAPI IDirectMusicBandImpl_Release (LPDIRECTMUSICBAND iface);
/* IDirectMusicBand: */
extern HRESULT WINAPI IDirectMusicBandImpl_CreateSegment (LPDIRECTMUSICBAND iface, IDirectMusicSegment** ppSegment);
extern HRESULT WINAPI IDirectMusicBandImpl_Download (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance);
extern HRESULT WINAPI IDirectMusicBandImpl_Unload (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance);
#endif /* __WINE_DMBAND_PRIVATE_H */
...@@ -3,13 +3,17 @@ TOPOBJDIR = ../.. ...@@ -3,13 +3,17 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = dmcompos.dll MODULE = dmcompos.dll
IMPORTS = dmusic kernel32 IMPORTS = ole32 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
dmcompos_main.c chordmap.c \
composer.c \
dmcompos_main.c \
regsvr.c
RC_SRCS = version.rc RC_SRCS = version.rc
......
/* IDirectMusicChordMap Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmcompos_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicChordMap IUnknown parts follow: */
HRESULT WINAPI IDirectMusicChordMapImpl_QueryInterface (LPDIRECTMUSICCHORDMAP iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicChordMapImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicChordMap))
{
IDirectMusicChordMapImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicChordMapImpl_AddRef (LPDIRECTMUSICCHORDMAP iface)
{
ICOM_THIS(IDirectMusicChordMapImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicChordMapImpl_Release (LPDIRECTMUSICCHORDMAP iface)
{
ICOM_THIS(IDirectMusicChordMapImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicChordMap Interface follow: */
HRESULT WINAPI IDirectMusicChordMapImpl_GetScale (LPDIRECTMUSICCHORDMAP iface, DWORD* pdwScale)
{
ICOM_THIS(IDirectMusicChordMapImpl,iface);
TRACE("(%p, %p)\n", This, pdwScale);
*pdwScale = This->dwScale;
return S_OK;
}
ICOM_VTABLE(IDirectMusicChordMap) DirectMusicChordMap_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicChordMapImpl_QueryInterface,
IDirectMusicChordMapImpl_AddRef,
IDirectMusicChordMapImpl_Release,
IDirectMusicChordMapImpl_GetScale
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicChordMap (LPCGUID lpcGUID, LPDIRECTMUSICCHORDMAP* ppDMCM, LPUNKNOWN pUnkOuter)
{
IDirectMusicChordMapImpl* dmchordmap;
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicChordMap))
{
dmchordmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordMapImpl));
if (NULL == dmchordmap) {
*ppDMCM = (LPDIRECTMUSICCHORDMAP) NULL;
return E_OUTOFMEMORY;
}
dmchordmap->lpVtbl = &DirectMusicChordMap_Vtbl;
dmchordmap->ref = 1;
*ppDMCM = (LPDIRECTMUSICCHORDMAP) dmchordmap;
return S_OK;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* IDirectMusicComposer
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmcompos_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicComposer IUnknown parts follow: */
HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicComposerImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicComposer))
{
IDirectMusicComposerImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface)
{
ICOM_THIS(IDirectMusicComposerImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface)
{
ICOM_THIS(IDirectMusicComposerImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicComposer Interface follow: */
HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromTemplate (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, IDirectMusicSegment* pTemplate, WORD wActivity, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment)
{
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %p, %d, %p, %p): stub\n", This, pStyle, pTemplate, wActivity, pChordMap, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromShape (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, WORD wNumMeasures, WORD wShape, WORD wActivity, BOOL fIntro, BOOL fEnd, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment)
{
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %d, %d, %d, %d, %d, %p, %p): stub\n", This, pStyle, wNumMeasures, wShape, wActivity, fIntro, fEnd, pChordMap, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_ComposeTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pFromSeg, IDirectMusicSegment* pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg)
{
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %p, %ld, %d, %ld, %p, %p): stub\n", This, pFromSeg, pToSeg, mtTime, wCommand, dwFlags, pChordMap, ppTransSeg);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_AutoTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicPerformance* pPerformance, IDirectMusicSegment* pToSeg, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg, IDirectMusicSegmentState** ppToSegState, IDirectMusicSegmentState** ppTransSegState)
{
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %d, %ld, %p, %p, %p, %p): stub\n", This, pPerformance, wCommand, dwFlags, pChordMap, ppTransSeg, ppToSegState, ppTransSegState);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_ComposeTemplateFromShape (LPDIRECTMUSICCOMPOSER iface, WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment** ppTemplate)
{
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %d, %d, %d, %d, %d, %p): stub\n", This, wNumMeasures, wShape, fIntro, fEnd, wEndLength, ppTemplate);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_ChangeChordMap (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pSegment, BOOL fTrackScale, IDirectMusicChordMap* pChordMap)
{
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %d, %p): stub\n", This, pSegment, fTrackScale, pChordMap);
return S_OK;
}
ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicComposerImpl_QueryInterface,
IDirectMusicComposerImpl_AddRef,
IDirectMusicComposerImpl_Release,
IDirectMusicComposerImpl_ComposeSegmentFromTemplate,
IDirectMusicComposerImpl_ComposeSegmentFromShape,
IDirectMusicComposerImpl_ComposeTransition,
IDirectMusicComposerImpl_AutoTransition,
IDirectMusicComposerImpl_ComposeTemplateFromShape,
IDirectMusicComposerImpl_ChangeChordMap
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicComposer (LPCGUID lpcGUID, LPDIRECTMUSICCOMPOSER* ppDMCP, LPUNKNOWN pUnkOuter)
{
IDirectMusicComposerImpl* dmcompos;
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicComposer))
{
dmcompos = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl));
if (NULL == dmcompos) {
*ppDMCP = (LPDIRECTMUSICCOMPOSER) NULL;
return E_OUTOFMEMORY;
}
dmcompos->lpVtbl = &DirectMusicComposer_Vtbl;
dmcompos->ref = 1;
*ppDMCP = (LPDIRECTMUSICCOMPOSER) dmcompos;
return S_OK;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
# Linked to main dmusic.dll for easier implementation 1 stdcall DllCanUnloadNow() DMCOMPOS_DllCanUnloadNow
2 stdcall DllGetClassObject(long long ptr) DMCOMPOS_DllGetClassObject
1 stdcall DllCanUnloadNow() dmusic.CanUnloadNow 3 stdcall DllRegisterServer() DMCOMPOS_DllRegisterServer
2 stdcall DllGetClassObject(long long ptr) dmusic.DllGetClassObject 4 stdcall DllUnregisterServer() DMCOMPOS_DllUnregisterServer
3 stdcall DllRegisterServer() dmusic.DllRegisterServer
4 stdcall DllUnregisterServer() dmusic.DllUnregisterServer
/* nothing here yet */ /* DirectMusicComposer Main
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "dmcompos_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/******************************************************************
* DirectMusicComposer ClassFactory
*
*
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
static HRESULT WINAPI DMCPCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI DMCPCF_AddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DMCPCF_Release(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI DMCPCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualGUID (riid, &IID_IDirectMusicChordMap)) {
return DMUSIC_CreateDirectMusicChordMap (riid, (LPDIRECTMUSICCHORDMAP*)ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicComposer)) {
return DMUSIC_CreateDirectMusicComposer (riid, (LPDIRECTMUSICCOMPOSER*)ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static HRESULT WINAPI DMCPCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) DMCPCF_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
DMCPCF_QueryInterface,
DMCPCF_AddRef,
DMCPCF_Release,
DMCPCF_CreateInstance,
DMCPCF_LockServer
};
static IClassFactoryImpl DMCOMPOS_CF = {&DMCPCF_Vtbl, 1 };
/******************************************************************
* DllMain
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */
}
return TRUE;
}
/******************************************************************
* DllCanUnloadNow (DMCOMPOS.1)
*
*
*/
HRESULT WINAPI DMCOMPOS_DllCanUnloadNow(void)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/******************************************************************
* DllGetClassObject (DMCOMPOS.2)
*
*
*/
HRESULT WINAPI DMCOMPOS_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (&IID_IClassFactory, riid)) {
*ppv = (LPVOID) &DMCOMPOS_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
WARN("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/* DirectMusicComposer Private Include
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __WINE_DMCOMPOS_PRIVATE_H
#define __WINE_DMCOMPOS_PRIVATE_H
#include "windef.h"
#include "wine/debug.h"
#include "winbase.h"
#include "winnt.h"
#include "dmusicc.h"
#include "dmusici.h"
#include "dmusics.h"
#include "dmplugin.h"
#include "dmusicf.h"
#include "dsound.h"
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicChordMapImpl IDirectMusicChordMapImpl;
typedef struct IDirectMusicComposerImpl IDirectMusicComposerImpl;
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(IDirectMusicChordMap) DirectMusicChordMap_Vtbl;
extern ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl;
/*****************************************************************************
* ClassFactory
*/
/* can support IID_IDirectMusicChordMap
* return always an IDirectMusicChordMapImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicChordMap (LPCGUID lpcGUID, LPDIRECTMUSICCHORDMAP* ppDMCM, LPUNKNOWN pUnkOuter);
/* can support IID_IDirectMusicComposer
* return always an IDirectMusicComposerImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicComposer (LPCGUID lpcGUID, LPDIRECTMUSICCOMPOSER* ppDMCP, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectMusicChordMapImpl implementation structure
*/
struct IDirectMusicChordMapImpl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicChordMap);
DWORD ref;
/* IDirectMusicChordMapImpl fields */
DWORD dwScale;
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicChordMapImpl_QueryInterface (LPDIRECTMUSICCHORDMAP iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicChordMapImpl_AddRef (LPDIRECTMUSICCHORDMAP iface);
extern ULONG WINAPI IDirectMusicChordMapImpl_Release (LPDIRECTMUSICCHORDMAP iface);
/* IDirectMusicChordMap: */
extern HRESULT WINAPI IDirectMusicChordMapImpl_GetScale (LPDIRECTMUSICCHORDMAP iface, DWORD* pdwScale);
/*****************************************************************************
* IDirectMusicComposerImpl implementation structure
*/
struct IDirectMusicComposerImpl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicComposer);
DWORD ref;
/* IDirectMusicComposerImpl fields */
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface);
extern ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface);
/* IDirectMusicComposer: */
extern HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromTemplate (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, IDirectMusicSegment* pTemplate, WORD wActivity, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment);
extern HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromShape (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, WORD wNumMeasures, WORD wShape, WORD wActivity, BOOL fIntro, BOOL fEnd, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment);
extern HRESULT WINAPI IDirectMusicComposerImpl_ComposeTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pFromSeg, IDirectMusicSegment* pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg);
extern HRESULT WINAPI IDirectMusicComposerImpl_AutoTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicPerformance* pPerformance, IDirectMusicSegment* pToSeg, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg, IDirectMusicSegmentState** ppToSegState, IDirectMusicSegmentState** ppTransSegState);
extern HRESULT WINAPI IDirectMusicComposerImpl_ComposeTemplateFromShape (LPDIRECTMUSICCOMPOSER iface, WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment** ppTemplate);
extern HRESULT WINAPI IDirectMusicComposerImpl_ChangeChordMap (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pSegment, BOOL fTrackScale, IDirectMusicChordMap* pChordMap);
#endif /* __WINE_DMCOMPOS_PRIVATE_H */
...@@ -3,13 +3,24 @@ TOPOBJDIR = ../.. ...@@ -3,13 +3,24 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = dmime.dll MODULE = dmime.dll
IMPORTS = dmusic kernel32 IMPORTS = dsound winmm ole32 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
dmime_main.c audiopath.c \
dmime_main.c \
graph.c \
patterntrack.c \
performance.c \
regsvr.c \
segment.c \
segmentstate.c \
song.c \
tool.c \
track.c
RC_SRCS = version.rc RC_SRCS = version.rc
......
/* IDirectMusicAudioPath Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicAudioPath IUnknown parts follow: */
HRESULT WINAPI IDirectMusicAudioPathImpl_QueryInterface (LPDIRECTMUSICAUDIOPATH iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicAudioPathImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicAudioPath))
{
IDirectMusicAudioPathImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicAudioPathImpl_AddRef (LPDIRECTMUSICAUDIOPATH iface)
{
ICOM_THIS(IDirectMusicAudioPathImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicAudioPathImpl_Release (LPDIRECTMUSICAUDIOPATH iface)
{
ICOM_THIS(IDirectMusicAudioPathImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicAudioPath Interface follow: */
HRESULT WINAPI IDirectMusicAudioPathImpl_GetObjectInPath (LPDIRECTMUSICAUDIOPATH iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, WORD dwIndex, REFGUID iidInterface, void** ppObject)
{
ICOM_THIS(IDirectMusicAudioPathImpl,iface);
FIXME("(%p, %ld, %ld, %ld, %s, %d, %s, %p): stub\n", This, dwPChannel, dwStage, dwBuffer, debugstr_guid(guidObject), dwIndex, debugstr_guid(iidInterface), ppObject);
switch (dwStage) {
case DMUS_PATH_BUFFER:
{
if (IsEqualGUID(iidInterface,&IID_IDirectSoundBuffer8)) {
IDirectSoundBuffer8_QueryInterface(This->pDSBuffer, &IID_IDirectSoundBuffer8, ppObject);
TRACE("returning %p\n",*ppObject);
return S_OK;
} else if (IsEqualGUID(iidInterface,&IID_IDirectSound3DBuffer)) {
IDirectSoundBuffer8_QueryInterface(This->pDSBuffer, &IID_IDirectSound3DBuffer, ppObject);
TRACE("returning %p\n",*ppObject);
return S_OK;
} else {
FIXME("Bad iid\n");
}
}
break;
case DMUS_PATH_PRIMARY_BUFFER: {
if (IsEqualGUID(iidInterface,&IID_IDirectSound3DListener)) {
IDirectSoundBuffer8_QueryInterface(This->pPrimary, &IID_IDirectSound3DListener, ppObject);
return S_OK;
}else {
FIXME("bad iid...\n");
}
}
break;
case DMUS_PATH_AUDIOPATH_GRAPH:
{
if (IsEqualGUID(iidInterface, &IID_IDirectMusicGraph)) {
if (NULL == This->pToolGraph) {
IDirectMusicGraphImpl* pGraph;
pGraph = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicGraphImpl));
pGraph->lpVtbl = &DirectMusicGraph_Vtbl;
pGraph->ref = 1;
This->pToolGraph = (IDirectMusicGraph*) pGraph;
}
*ppObject = (LPDIRECTMUSICGRAPH) This->pToolGraph;
IDirectMusicGraphImpl_AddRef((LPDIRECTMUSICGRAPH) *ppObject);
return S_OK;
}
}
break;
case DMUS_PATH_AUDIOPATH_TOOL:
{
/* TODO */
}
break;
case DMUS_PATH_PERFORMANCE:
{
/* TODO check wanted GUID */
*ppObject = (LPDIRECTMUSICPERFORMANCE8) This->pPerf;
IDirectMusicPerformance8Impl_AddRef((LPDIRECTMUSICPERFORMANCE8) *ppObject);
return S_OK;
}
break;
case DMUS_PATH_PERFORMANCE_GRAPH:
{
IDirectMusicGraph* pPerfoGraph = NULL;
IDirectMusicPerformance8Impl_GetGraph((LPDIRECTMUSICPERFORMANCE8) This->pPerf, &pPerfoGraph);
if (NULL == pPerfoGraph) {
IDirectMusicGraphImpl* pGraph = NULL;
pGraph = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicGraphImpl));
pGraph->lpVtbl = &DirectMusicGraph_Vtbl;
pGraph->ref = 1;
IDirectMusicPerformance8Impl_SetGraph((LPDIRECTMUSICPERFORMANCE8) This->pPerf, (IDirectMusicGraph*) pGraph);
/* we need release as SetGraph do an AddRef */
IDirectMusicGraphImpl_Release((LPDIRECTMUSICGRAPH) pGraph);
pPerfoGraph = (LPDIRECTMUSICGRAPH) pGraph;
}
*ppObject = (LPDIRECTMUSICGRAPH) pPerfoGraph;
return S_OK;
}
break;
case DMUS_PATH_PERFORMANCE_TOOL:
default:
break;
}
*ppObject = NULL;
return E_INVALIDARG;
}
HRESULT WINAPI IDirectMusicAudioPathImpl_Activate (LPDIRECTMUSICAUDIOPATH iface, BOOL fActivate)
{
ICOM_THIS(IDirectMusicAudioPathImpl,iface);
FIXME("(%p, %d): stub\n", This, fActivate);
return S_OK;
}
HRESULT WINAPI IDirectMusicAudioPathImpl_SetVolume (LPDIRECTMUSICAUDIOPATH iface, long lVolume, DWORD dwDuration)
{
ICOM_THIS(IDirectMusicAudioPathImpl,iface);
FIXME("(%p, %li, %ld): stub\n", This, lVolume, dwDuration);
return S_OK;
}
HRESULT WINAPI IDirectMusicAudioPathImpl_ConvertPChannel (LPDIRECTMUSICAUDIOPATH iface, DWORD dwPChannelIn, DWORD* pdwPChannelOut)
{
ICOM_THIS(IDirectMusicAudioPathImpl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwPChannelIn, pdwPChannelOut);
return S_OK;
}
ICOM_VTABLE(IDirectMusicAudioPath) DirectMusicAudioPath_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicAudioPathImpl_QueryInterface,
IDirectMusicAudioPathImpl_AddRef,
IDirectMusicAudioPathImpl_Release,
IDirectMusicAudioPathImpl_GetObjectInPath,
IDirectMusicAudioPathImpl_Activate,
IDirectMusicAudioPathImpl_SetVolume,
IDirectMusicAudioPathImpl_ConvertPChannel
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPath (LPCGUID lpcGUID, LPDIRECTMUSICAUDIOPATH* ppDMCAPath, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicAudioPath))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
# Linked to main dmusic.dll for easier implementation 1 stdcall DllCanUnloadNow() DMIME_DllCanUnloadNow
2 stdcall DllGetClassObject(long long ptr) DMIME_DllGetClassObject
1 stdcall DllCanUnloadNow() dmusic.DllCanUnloadNow 3 stdcall DllRegisterServer() DMIME_DllRegisterServer
2 stdcall DllGetClassObject(long long ptr) dmusic.DllGetClassObject 4 stdcall DllUnregisterServer() DMIME_DllUnregisterServer
3 stdcall DllRegisterServer() dmusic.DllRegisterServer
4 stdcall DllUnregisterServer() dmusic.DllUnregisterServer
/* nothing here yet */ /* DirectMusicInteractiveEngine Main
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/******************************************************************
* DirectMusicInteractiveEngine ClassFactory
*
*
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
static HRESULT WINAPI DMIMECF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI DMIMECF_AddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DMIMECF_Release(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI DMIMECF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualGUID (riid, &IID_IDirectMusicPerformance) ||
IsEqualGUID (riid, &IID_IDirectMusicPerformance8)) {
return DMUSIC_CreateDirectMusicPerformance (riid, (LPDIRECTMUSICPERFORMANCE8*) ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicSegment) ||
IsEqualGUID (riid, &IID_IDirectMusicSegment8)) {
return DMUSIC_CreateDirectMusicSegment (riid, (LPDIRECTMUSICSEGMENT8*) ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicSegmentState) ||
IsEqualGUID (riid, &IID_IDirectMusicSegmentState8)) {
return DMUSIC_CreateDirectMusicSegmentState (riid, (LPDIRECTMUSICSEGMENTSTATE8*) ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicGraph)) {
return DMUSIC_CreateDirectMusicGraph (riid, (LPDIRECTMUSICGRAPH*) ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicAudioPath)) {
return DMUSIC_CreateDirectMusicSong (riid, (LPDIRECTMUSICSONG*) ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicAudioPath)) {
return DMUSIC_CreateDirectMusicAudioPath (riid, (LPDIRECTMUSICAUDIOPATH*) ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicTool) ||
IsEqualGUID (riid, &IID_IDirectMusicTool8)) {
return DMUSIC_CreateDirectMusicTool (riid, (LPDIRECTMUSICTOOL8*) ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicTrack) ||
IsEqualGUID (riid, &IID_IDirectMusicTrack8)) {
return DMUSIC_CreateDirectMusicTrack (riid, (LPDIRECTMUSICTRACK8*) ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicPatternTrack)) {
return DMUSIC_CreateDirectMusicPatternTrack (riid, (LPDIRECTMUSICPATTERNTRACK*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static HRESULT WINAPI DMIMECF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) DMIMECF_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
DMIMECF_QueryInterface,
DMIMECF_AddRef,
DMIMECF_Release,
DMIMECF_CreateInstance,
DMIMECF_LockServer
};
static IClassFactoryImpl DMIME_CF = {&DMIMECF_Vtbl, 1 };
/******************************************************************
* DllMain
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */
}
return TRUE;
}
/******************************************************************
* DllCanUnloadNow (DMIME.1)
*
*
*/
HRESULT WINAPI DMIME_DllCanUnloadNow(void)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/******************************************************************
* DllGetClassObject (DMIME.2)
*
*
*/
HRESULT WINAPI DMIME_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (&IID_IClassFactory, riid)) {
*ppv = (LPVOID) &DMIME_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
WARN("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/* IDirectMusicGraph
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicGraph IUnknown parts follow: */
HRESULT WINAPI IDirectMusicGraphImpl_QueryInterface (LPDIRECTMUSICGRAPH iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicGraphImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicGraph))
{
IDirectMusicGraphImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicGraphImpl_AddRef (LPDIRECTMUSICGRAPH iface)
{
ICOM_THIS(IDirectMusicGraphImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicGraphImpl_Release (LPDIRECTMUSICGRAPH iface)
{
ICOM_THIS(IDirectMusicGraphImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicGraph Interface follow: */
HRESULT WINAPI IDirectMusicGraphImpl_StampPMsg (LPDIRECTMUSICGRAPH iface, DMUS_PMSG* pPMSG)
{
ICOM_THIS(IDirectMusicGraphImpl,iface);
FIXME("(%p, %p): stub\n", This, pPMSG);
return S_OK;
}
HRESULT WINAPI IDirectMusicGraphImpl_InsertTool (LPDIRECTMUSICGRAPH iface, IDirectMusicTool* pTool, DWORD* pdwPChannels, DWORD cPChannels, LONG lIndex)
{
int i;
IDirectMusicTool8Impl* p;
IDirectMusicTool8Impl* toAdd = (IDirectMusicTool8Impl*) pTool;
ICOM_THIS(IDirectMusicGraphImpl,iface);
FIXME("(%p, %p, %p, %ld, %li): use of pdwPChannels\n", This, pTool, pdwPChannels, cPChannels, lIndex);
if (0 == This->num_tools) {
This->pFirst = This->pLast = toAdd;
toAdd->pPrev = toAdd->pNext = NULL;
} else if (lIndex == 0 || lIndex <= -This->num_tools) {
This->pFirst->pPrev = toAdd;
toAdd->pNext = This->pFirst;
toAdd->pPrev = NULL;
This->pFirst = toAdd;
} else if (lIndex < 0) {
p = This->pLast;
for (i = 0; i < -lIndex; ++i) {
p = p->pPrev;
}
toAdd->pNext = p->pNext;
if (p->pNext) p->pNext->pPrev = toAdd;
p->pNext = toAdd;
toAdd->pPrev = p;
} else if (lIndex >= This->num_tools) {
This->pLast->pNext = toAdd;
toAdd->pPrev = This->pLast;
toAdd->pNext = NULL;
This->pLast = toAdd;
} else if (lIndex > 0) {
p = This->pFirst;
for (i = 0; i < lIndex; ++i) {
p = p->pNext;
}
toAdd->pPrev = p->pPrev;
if (p->pPrev) p->pPrev->pNext = toAdd;
p->pPrev = toAdd;
toAdd->pNext = p;
}
++This->num_tools;
return DS_OK;
}
HRESULT WINAPI IDirectMusicGraphImpl_GetTool (LPDIRECTMUSICGRAPH iface, DWORD dwIndex, IDirectMusicTool** ppTool)
{
int i;
IDirectMusicTool8Impl* p = NULL;
ICOM_THIS(IDirectMusicGraphImpl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwIndex, ppTool);
p = This->pFirst;
for (i = 0; i < dwIndex && i < This->num_tools; ++i) {
p = p->pNext;
}
*ppTool = (IDirectMusicTool*) p;
if (NULL != *ppTool) {
IDirectMusicTool8Impl_AddRef((LPDIRECTMUSICTOOL8) *ppTool);
}
return DS_OK;
}
HRESULT WINAPI IDirectMusicGraphImpl_RemoveTool (LPDIRECTMUSICGRAPH iface, IDirectMusicTool* pTool)
{
ICOM_THIS(IDirectMusicGraphImpl,iface);
FIXME("(%p, %p): stub\n", This, pTool);
return S_OK;
}
ICOM_VTABLE(IDirectMusicGraph) DirectMusicGraph_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicGraphImpl_QueryInterface,
IDirectMusicGraphImpl_AddRef,
IDirectMusicGraphImpl_Release,
IDirectMusicGraphImpl_StampPMsg,
IDirectMusicGraphImpl_InsertTool,
IDirectMusicGraphImpl_GetTool,
IDirectMusicGraphImpl_RemoveTool
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicGraph (LPCGUID lpcGUID, LPDIRECTMUSICGRAPH *ppDMGrph, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicGraph))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* IDirectMusicPatternTrack Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicPatternTrack IUnknown parts follow: */
HRESULT WINAPI IDirectMusicPatternTrackImpl_QueryInterface (LPDIRECTMUSICPATTERNTRACK iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicPatternTrack))
{
IDirectMusicPatternTrackImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicPatternTrackImpl_AddRef (LPDIRECTMUSICPATTERNTRACK iface)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK iface)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicPatternTrack Interface follow: */
HRESULT WINAPI IDirectMusicPatternTrackImpl_CreateSegment (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicStyle* pStyle, IDirectMusicSegment** ppSegment)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pStyle, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetVariation (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, DWORD dwVariationFlags, DWORD dwPart)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %ld, %ld): stub\n", This, pSegState, dwVariationFlags, dwPart);
return S_OK;
}
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetPatternByName (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, WCHAR* wszName, IDirectMusicStyle* pStyle, DWORD dwPatternType, DWORD* pdwLength)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %p, %p, %ld, %p): stub\n", This, pSegState, wszName, pStyle, dwPatternType, pdwLength);
return S_OK;
}
ICOM_VTABLE(IDirectMusicPatternTrack) DirectMusicPatternTrack_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicPatternTrackImpl_QueryInterface,
IDirectMusicPatternTrackImpl_AddRef,
IDirectMusicPatternTrackImpl_Release,
IDirectMusicPatternTrackImpl_CreateSegment,
IDirectMusicPatternTrackImpl_SetVariation,
IDirectMusicPatternTrackImpl_SetPatternByName
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrack (LPCGUID lpcGUID, LPDIRECTMUSICPATTERNTRACK *ppDMPtrnTrack, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicComposer))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* IDirectMusicSegment Implementation /* IDirectMusicSegment8 Implementation
* IDirectMusicSegment8 Implementation
* IDirectMusicSegmentState Implementation
* IDirectMusicSegmentState8 Implementation
* IDirectMusicPatternTrack Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003 Rok Mandeljc
* *
...@@ -27,7 +23,7 @@ ...@@ -27,7 +23,7 @@
#include "wingdi.h" #include "wingdi.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "dmusic_private.h" #include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
...@@ -276,7 +272,7 @@ HRESULT WINAPI IDirectMusicSegment8Impl_SetPChannelsUsed (LPDIRECTMUSICSEGMENT8 ...@@ -276,7 +272,7 @@ HRESULT WINAPI IDirectMusicSegment8Impl_SetPChannelsUsed (LPDIRECTMUSICSEGMENT8
return S_OK; return S_OK;
} }
/* IDirectMusicSegment Interface part follow: */ /* IDirectMusicSegment8 Interface part follow: */
HRESULT WINAPI IDirectMusicSegment8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff) HRESULT WINAPI IDirectMusicSegment8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff)
{ {
ICOM_THIS(IDirectMusicSegment8Impl,iface); ICOM_THIS(IDirectMusicSegment8Impl,iface);
...@@ -358,194 +354,15 @@ ICOM_VTABLE(IDirectMusicSegment8) DirectMusicSegment8_Vtbl = ...@@ -358,194 +354,15 @@ ICOM_VTABLE(IDirectMusicSegment8) DirectMusicSegment8_Vtbl =
IDirectMusicSegment8Impl_Unload IDirectMusicSegment8Impl_Unload
}; };
/* for ClassFactory */
/* IDirectMusicSegmentState8 IUnknown part follow: */ HRESULT WINAPI DMUSIC_CreateDirectMusicSegment (LPCGUID lpcGUID, LPDIRECTMUSICSEGMENT8 *ppDMSeg, LPUNKNOWN pUnkOuter)
HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface, REFIID riid, LPVOID *ppobj)
{ {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); if (IsEqualGUID (lpcGUID, &IID_IDirectMusicComposer))
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicSegmentState) ||
IsEqualGUID(riid, &IID_IDirectMusicSegmentState8))
{ {
IDirectMusicSegmentState8Impl_AddRef(iface); FIXME("Not yet\n");
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
} }
return ref; WARN("No interface found\n");
}
/* IDirectMusicSegmentState Interface part follow: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD* pdwRepeats)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwRepeats);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface, IDirectMusicSegment** ppSegment)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtStart);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtSeek)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtSeek);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtStart);
return S_OK;
}
/* IDirectMusicSegmentState8 Interface part follow: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This, debugstr_guid(rguidTrackClassID), dwGroupBits, dwIndex, dwFlagsOn, dwFlagsOff);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void** ppObject)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %ld, %ld, %ld, %s, %ld, %s, %p): stub\n", This, dwPChannel, dwStage, dwBuffer, debugstr_guid(guidObject), dwIndex, debugstr_guid(iidInterface), ppObject);
return S_OK;
}
ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicSegmentState8Impl_QueryInterface,
IDirectMusicSegmentState8Impl_AddRef,
IDirectMusicSegmentState8Impl_Release,
IDirectMusicSegmentState8Impl_GetRepeats,
IDirectMusicSegmentState8Impl_GetSegment,
IDirectMusicSegmentState8Impl_GetStartTime,
IDirectMusicSegmentState8Impl_GetSeek,
IDirectMusicSegmentState8Impl_GetStartPoint,
IDirectMusicSegmentState8Impl_SetTrackConfig,
IDirectMusicSegmentState8Impl_GetObjectInPath
};
/* IDirectMusicPatternTrack IUnknown parts follow: */
HRESULT WINAPI IDirectMusicPatternTrackImpl_QueryInterface (LPDIRECTMUSICPATTERNTRACK iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicPatternTrack))
{
IDirectMusicPatternTrackImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicPatternTrackImpl_AddRef (LPDIRECTMUSICPATTERNTRACK iface)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK iface)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicPatternTrack Interface follow: */
HRESULT WINAPI IDirectMusicPatternTrackImpl_CreateSegment (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicStyle* pStyle, IDirectMusicSegment** ppSegment)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pStyle, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetVariation (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, DWORD dwVariationFlags, DWORD dwPart)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %ld, %ld): stub\n", This, pSegState, dwVariationFlags, dwPart);
return S_OK;
}
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetPatternByName (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, WCHAR* wszName, IDirectMusicStyle* pStyle, DWORD dwPatternType, DWORD* pdwLength)
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %p, %p, %ld, %p): stub\n", This, pSegState, wszName, pStyle, dwPatternType, pdwLength);
return S_OK;
}
ICOM_VTABLE(IDirectMusicPatternTrack) DirectMusicPatternTrack_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicPatternTrackImpl_QueryInterface,
IDirectMusicPatternTrackImpl_AddRef,
IDirectMusicPatternTrackImpl_Release,
IDirectMusicPatternTrackImpl_CreateSegment,
IDirectMusicPatternTrackImpl_SetVariation,
IDirectMusicPatternTrackImpl_SetPatternByName
};
/* IDirectMusicSegmentState8 Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicSegmentState8 IUnknown part follow: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicSegmentState) ||
IsEqualGUID(riid, &IID_IDirectMusicSegmentState8))
{
IDirectMusicSegmentState8Impl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicSegmentState Interface part follow: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD* pdwRepeats)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwRepeats);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface, IDirectMusicSegment** ppSegment)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtStart);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtSeek)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtSeek);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtStart);
return S_OK;
}
/* IDirectMusicSegmentState8 Interface part follow: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This, debugstr_guid(rguidTrackClassID), dwGroupBits, dwIndex, dwFlagsOn, dwFlagsOff);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void** ppObject)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %ld, %ld, %ld, %s, %ld, %s, %p): stub\n", This, dwPChannel, dwStage, dwBuffer, debugstr_guid(guidObject), dwIndex, debugstr_guid(iidInterface), ppObject);
return S_OK;
}
ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicSegmentState8Impl_QueryInterface,
IDirectMusicSegmentState8Impl_AddRef,
IDirectMusicSegmentState8Impl_Release,
IDirectMusicSegmentState8Impl_GetRepeats,
IDirectMusicSegmentState8Impl_GetSegment,
IDirectMusicSegmentState8Impl_GetStartTime,
IDirectMusicSegmentState8Impl_GetSeek,
IDirectMusicSegmentState8Impl_GetStartPoint,
IDirectMusicSegmentState8Impl_SetTrackConfig,
IDirectMusicSegmentState8Impl_GetObjectInPath
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentState (LPCGUID lpcGUID, LPDIRECTMUSICSEGMENTSTATE8 *ppDMSeg, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicComposer))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* IDirectMusicSong Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicSong IUnknown parts follow: */
HRESULT WINAPI IDirectMusicSongImpl_QueryInterface (LPDIRECTMUSICSONG iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicSong))
{
IDirectMusicSongImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicSongImpl_AddRef (LPDIRECTMUSICSONG iface)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicSongImpl_Release (LPDIRECTMUSICSONG iface)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicSong Interface follow: */
HRESULT WINAPI IDirectMusicSongImpl_Compose (LPDIRECTMUSICSONG iface)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
FIXME("(%p): stub\n", This);
return S_OK;
}
HRESULT WINAPI IDirectMusicSongImpl_GetParam (LPDIRECTMUSICSONG iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
FIXME("(%p, %s, %ld, %ld, %ld, %p, %p): stub\n", This, debugstr_guid(rguidType), dwGroupBits, dwIndex, mtTime, pmtNext, pParam);
return S_OK;
}
HRESULT WINAPI IDirectMusicSongImpl_GetSegment (LPDIRECTMUSICSONG iface, WCHAR* pwzName, IDirectMusicSegment** ppSegment)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pwzName, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicSongImpl_GetAudioPathConfig (LPDIRECTMUSICSONG iface, IUnknown** ppAudioPathConfig)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
FIXME("(%p, %p): stub\n", This, ppAudioPathConfig);
return S_OK;
}
HRESULT WINAPI IDirectMusicSongImpl_Download (LPDIRECTMUSICSONG iface, IUnknown* pAudioPath)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
FIXME("(%p, %p): stub\n", This, pAudioPath);
return S_OK;
}
HRESULT WINAPI IDirectMusicSongImpl_Unload (LPDIRECTMUSICSONG iface, IUnknown* pAudioPath)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
FIXME("(%p, %p): stub\n", This, pAudioPath);
return S_OK;
}
HRESULT WINAPI IDirectMusicSongImpl_EnumSegment (LPDIRECTMUSICSONG iface, DWORD dwIndex, IDirectMusicSegment** ppSegment)
{
ICOM_THIS(IDirectMusicSongImpl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwIndex, ppSegment);
return S_OK;
}
ICOM_VTABLE(IDirectMusicSong) DirectMusicSong_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicSongImpl_QueryInterface,
IDirectMusicSongImpl_AddRef,
IDirectMusicSongImpl_Release,
IDirectMusicSongImpl_Compose,
IDirectMusicSongImpl_GetParam,
IDirectMusicSongImpl_GetSegment,
IDirectMusicSongImpl_GetAudioPathConfig,
IDirectMusicSongImpl_Download,
IDirectMusicSongImpl_Unload,
IDirectMusicSongImpl_EnumSegment
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSong (LPCGUID lpcGUID, LPDIRECTMUSICSONG *ppDMSng, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicComposer))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* IDirectMusicTool8 Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicTool8 IUnknown part follow: */
HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicTool) ||
IsEqualGUID(riid, &IID_IDirectMusicTool8))
{
IDirectMusicTool8Impl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicTool Interface follow: */
HRESULT WINAPI IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface, IDirectMusicGraph* pGraph)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pGraph);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface, DWORD* pdwDeliveryType)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwDeliveryType);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface, DWORD* pdwNumElements)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwNumElements);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface, DWORD** padwMediaTypes, DWORD dwNumElements)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %ld): stub\n", This, padwMediaTypes, dwNumElements);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %p): stub\n", This, pPerf, pPMSG);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %p, %lli): stub\n", This, pPerf, pPMSG, rtTime);
return S_OK;
}
/* IDirectMusicTool8 Interface part follow: */
HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, ppTool);
return S_OK;
}
ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicTool8Impl_QueryInterface,
IDirectMusicTool8Impl_AddRef,
IDirectMusicTool8Impl_Release,
IDirectMusicTool8Impl_Init,
IDirectMusicTool8Impl_GetMsgDeliveryType,
IDirectMusicTool8Impl_GetMediaTypeArraySize,
IDirectMusicTool8Impl_GetMediaTypes,
IDirectMusicTool8Impl_ProcessPMsg,
IDirectMusicTool8Impl_Flush,
IDirectMusicTool8Impl_Clone
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicTool (LPCGUID lpcGUID, LPDIRECTMUSICTOOL8 *ppDMTool, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicComposer))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* IDirectMusicTool Implementation /* IDirectMusicTrack8 Implementation
* IDirectMusicTool8 Implementation
* IDirectMusicTrack Implementation
* IDirectMusicTrack8 Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003 Rok Mandeljc
* *
...@@ -26,128 +23,10 @@ ...@@ -26,128 +23,10 @@
#include "wingdi.h" #include "wingdi.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "dmusic_private.h" #include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicTool8 IUnknown part follow: */
HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicTool) ||
IsEqualGUID(riid, &IID_IDirectMusicTool8))
{
IDirectMusicTool8Impl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicTool Interface follow: */
HRESULT WINAPI IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface, IDirectMusicGraph* pGraph)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pGraph);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface, DWORD* pdwDeliveryType)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwDeliveryType);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface, DWORD* pdwNumElements)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwNumElements);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface, DWORD** padwMediaTypes, DWORD dwNumElements)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %ld): stub\n", This, padwMediaTypes, dwNumElements);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %p): stub\n", This, pPerf, pPMSG);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %p, FIXME): stub\n", This, pPerf, pPMSG/*, rtTime*/);
return S_OK;
}
/* IDirectMusicTool8 Interface part follow: */
HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool)
{
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, ppTool);
return S_OK;
}
ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicTool8Impl_QueryInterface,
IDirectMusicTool8Impl_AddRef,
IDirectMusicTool8Impl_Release,
IDirectMusicTool8Impl_Init,
IDirectMusicTool8Impl_GetMsgDeliveryType,
IDirectMusicTool8Impl_GetMediaTypeArraySize,
IDirectMusicTool8Impl_GetMediaTypes,
IDirectMusicTool8Impl_ProcessPMsg,
IDirectMusicTool8Impl_Flush,
IDirectMusicTool8Impl_Clone
};
/* IDirectMusicTrack8 IUnknown part follow: */ /* IDirectMusicTrack8 IUnknown part follow: */
HRESULT WINAPI IDirectMusicTrack8Impl_QueryInterface (LPDIRECTMUSICTRACK8 iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicTrack8Impl_QueryInterface (LPDIRECTMUSICTRACK8 iface, REFIID riid, LPVOID *ppobj)
{ {
...@@ -280,7 +159,7 @@ HRESULT WINAPI IDirectMusicTrack8Impl_PlayEx (LPDIRECTMUSICTRACK8 iface, void* p ...@@ -280,7 +159,7 @@ HRESULT WINAPI IDirectMusicTrack8Impl_PlayEx (LPDIRECTMUSICTRACK8 iface, void* p
{ {
ICOM_THIS(IDirectMusicTrack8Impl,iface); ICOM_THIS(IDirectMusicTrack8Impl,iface);
FIXME("(%p, %p, FIXME, FIXME, FIXME, %ld, %p, %p, %ld): stub\n", This, pStateData/*, rtStart, rtEnd, rtOffset*/, dwFlags, pPerf, pSegSt, dwVirtualID); FIXME("(%p, %p, %lli, %lli, %lli, %ld, %p, %p, %ld): stub\n", This, pStateData, rtStart, rtEnd, rtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
return S_OK; return S_OK;
} }
...@@ -289,7 +168,7 @@ HRESULT WINAPI IDirectMusicTrack8Impl_GetParamEx (LPDIRECTMUSICTRACK8 iface, REF ...@@ -289,7 +168,7 @@ HRESULT WINAPI IDirectMusicTrack8Impl_GetParamEx (LPDIRECTMUSICTRACK8 iface, REF
{ {
ICOM_THIS(IDirectMusicTrack8Impl,iface); ICOM_THIS(IDirectMusicTrack8Impl,iface);
FIXME("(%p, %s, FIXME, %p, %p, %p, %ld): stub\n", This, debugstr_guid(rguidType)/*, rtTime*/, prtNext, pParam, pStateData, dwFlags); FIXME("(%p, %s, %lli, %p, %p, %p, %ld): stub\n", This, debugstr_guid(rguidType), rtTime, prtNext, pParam, pStateData, dwFlags);
return S_OK; return S_OK;
} }
...@@ -298,7 +177,7 @@ HRESULT WINAPI IDirectMusicTrack8Impl_SetParamEx (LPDIRECTMUSICTRACK8 iface, REF ...@@ -298,7 +177,7 @@ HRESULT WINAPI IDirectMusicTrack8Impl_SetParamEx (LPDIRECTMUSICTRACK8 iface, REF
{ {
ICOM_THIS(IDirectMusicTrack8Impl,iface); ICOM_THIS(IDirectMusicTrack8Impl,iface);
FIXME("(%p, %s, FIXME, %p, %p, %ld): stub\n", This, debugstr_guid(rguidType)/*, rtTime*/, pParam, pStateData, dwFlags); FIXME("(%p, %s, %lli, %p, %p, %ld): stub\n", This, debugstr_guid(rguidType), rtTime, pParam, pStateData, dwFlags);
return S_OK; return S_OK;
} }
...@@ -343,3 +222,16 @@ ICOM_VTABLE(IDirectMusicTrack8) DirectMusicTrack8_Vtbl = ...@@ -343,3 +222,16 @@ ICOM_VTABLE(IDirectMusicTrack8) DirectMusicTrack8_Vtbl =
IDirectMusicTrack8Impl_Compose, IDirectMusicTrack8Impl_Compose,
IDirectMusicTrack8Impl_Join IDirectMusicTrack8Impl_Join
}; };
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicTrack (LPCGUID lpcGUID, LPDIRECTMUSICTRACK8 *ppDMTrack, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicComposer))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
...@@ -3,13 +3,18 @@ TOPOBJDIR = ../.. ...@@ -3,13 +3,18 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = dmloader.dll MODULE = dmloader.dll
IMPORTS = dmusic kernel32 IMPORTS = ole32 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
dmloader_main.c container.c \
dmloader_main.c \
getloader.c \
loader.c \
regsvr.c
RC_SRCS = version.rc RC_SRCS = version.rc
......
/* IDirectMusicContainer
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmloader_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicContainer IUnknown parts follow: */
HRESULT WINAPI IDirectMusicContainerImpl_QueryInterface (LPDIRECTMUSICCONTAINER iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicContainerImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicContainer))
{
IDirectMusicContainerImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicContainerImpl_AddRef (LPDIRECTMUSICCONTAINER iface)
{
ICOM_THIS(IDirectMusicContainerImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicContainerImpl_Release (LPDIRECTMUSICCONTAINER iface)
{
ICOM_THIS(IDirectMusicContainerImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicContainer Interface follow: */
HRESULT WINAPI IDirectMusicContainerImpl_EnumObject (LPDIRECTMUSICCONTAINER iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc, WCHAR* pwszAlias)
{
ICOM_THIS(IDirectMusicContainerImpl,iface);
FIXME("(%p, %s, %ld, %p, %p): stub\n", This, debugstr_guid(rguidClass), dwIndex, pDesc, pwszAlias);
return S_OK;
}
ICOM_VTABLE(IDirectMusicContainer) DirectMusicContainer_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicContainerImpl_QueryInterface,
IDirectMusicContainerImpl_AddRef,
IDirectMusicContainerImpl_Release,
IDirectMusicContainerImpl_EnumObject
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicContainer (LPCGUID lpcGUID, LPDIRECTMUSICCONTAINER *ppDMCon, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicContainer))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
# Linked to main dmusic.dll for easier implementation 1 stdcall DllCanUnloadNow() DMLOADER_DllCanUnloadNow
2 stdcall DllGetClassObject(long long ptr) DMLOADER_DllGetClassObject
1 stdcall DllCanUnloadNow() dmusic.DllCanUnloadNow 3 stdcall DllRegisterServer() DMLOADER_DllRegisterServer
2 stdcall DllGetClassObject(long long ptr) dmusic.DllGetClassObject 4 stdcall DllUnregisterServer() DMLOADER_DllUnregisterServer
3 stdcall DllRegisterServer() dmusic.DllRegisterServer
4 stdcall DllUnregisterServer() dmusic.DllUnregisterServer
/* nothing here yet */ /* DirectMusicLoader Main
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "dmloader_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/******************************************************************
* DirectMusicLoader ClassFactory
*
*
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
static HRESULT WINAPI DMLOADCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI DMLOADCF_AddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DMLOADCF_Release(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI DMLOADCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualGUID (&IID_IDirectMusicLoader, riid) ||
IsEqualGUID (&IID_IDirectMusicLoader8, riid)) {
return DMUSIC_CreateDirectMusicLoader(riid, (LPDIRECTMUSICLOADER8*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static HRESULT WINAPI DMLOADCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) DMLOADCF_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
DMLOADCF_QueryInterface,
DMLOADCF_AddRef,
DMLOADCF_Release,
DMLOADCF_CreateInstance,
DMLOADCF_LockServer
};
static IClassFactoryImpl DMLOADER_CF = {&DMLOADCF_Vtbl, 1 };
/******************************************************************
* DllMain
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */
}
return TRUE;
}
/******************************************************************
* DllCanUnloadNow (DMLOADER.1)
*
*
*/
HRESULT WINAPI DMLOADER_DllCanUnloadNow(void)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/******************************************************************
* DllGetClassObject (DMLOADER.2)
*
*
*/
HRESULT WINAPI DMLOADER_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (&IID_IClassFactory, riid)) {
*ppv = (LPVOID) &DMLOADER_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
WARN("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/* DirectMusicLoader Private Include
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __WINE_DMLOADER_PRIVATE_H
#define __WINE_DMLOADER_PRIVATE_H
#include "windef.h"
#include "wine/debug.h"
#include "winbase.h"
#include "winnt.h"
#include "dmusicc.h"
#include "dmusici.h"
#include "dmusics.h"
#include "dmplugin.h"
#include "dmusicf.h"
#include "dsound.h"
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicLoader8Impl IDirectMusicLoader8Impl;
typedef struct IDirectMusicContainerImpl IDirectMusicContainerImpl;
typedef struct IDirectMusicGetLoaderImpl IDirectMusicGetLoaderImpl;
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(IDirectMusicLoader8) DirectMusicLoader8_Vtbl;
extern ICOM_VTABLE(IDirectMusicContainer) DirectMusicContainer_Vtbl;
extern ICOM_VTABLE(IDirectMusicGetLoader) DirectMusicGetLoader_Vtbl;
/*****************************************************************************
* ClassFactory
*/
/* can support IID_IDirectMusicLoader and IID_IDirectMusicLoader8
* return always an IDirectMusicLoader8Impl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoader (LPCGUID lpcGUID, LPDIRECTMUSICLOADER8 *ppDMLoad, LPUNKNOWN pUnkOuter);
/* can support IID_IDirectMusicContainer
* return always an IDirectMusicContainerImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicContainer (LPCGUID lpcGUID, LPDIRECTMUSICCONTAINER *ppDMCon, LPUNKNOWN pUnkOuter);
/* can support IID_IDirectMusicGetLoader
* return always an IDirectMusicGetLoaderImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicGetLoader (LPCGUID lpcGUID, LPDIRECTMUSICGETLOADER *ppDMGetLoad, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectMusicLoader8Impl implementation structure
*/
struct IDirectMusicLoader8Impl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicLoader8);
DWORD ref;
/* IDirectMusicLoaderImpl fields */
WCHAR wzSearchPath[MAX_PATH];
/* IDirectMusicLoader8Impl fields */
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicLoader8Impl_QueryInterface (LPDIRECTMUSICLOADER8 iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicLoader8Impl_AddRef (LPDIRECTMUSICLOADER8 iface);
extern ULONG WINAPI IDirectMusicLoader8Impl_Release (LPDIRECTMUSICLOADER8 iface);
/* IDirectMusicLoader: */
extern HRESULT WINAPI IDirectMusicLoader8Impl_GetObject (LPDIRECTMUSICLOADER8 iface, LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID*ppv);
extern HRESULT WINAPI IDirectMusicLoader8Impl_SetObject (LPDIRECTMUSICLOADER8 iface, LPDMUS_OBJECTDESC pDesc);
extern HRESULT WINAPI IDirectMusicLoader8Impl_SetSearchDirectory (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, WCHAR* pwzPath, BOOL fClear);
extern HRESULT WINAPI IDirectMusicLoader8Impl_ScanDirectory (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, WCHAR* pwzFileExtension, WCHAR* pwzScanFileName);
extern HRESULT WINAPI IDirectMusicLoader8Impl_CacheObject (LPDIRECTMUSICLOADER8 iface, IDirectMusicObject* pObject);
extern HRESULT WINAPI IDirectMusicLoader8Impl_ReleaseObject (LPDIRECTMUSICLOADER8 iface, IDirectMusicObject* pObject);
extern HRESULT WINAPI IDirectMusicLoader8Impl_ClearCache (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass);
extern HRESULT WINAPI IDirectMusicLoader8Impl_EnableCache (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, BOOL fEnable);
extern HRESULT WINAPI IDirectMusicLoader8Impl_EnumObject (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc);
/* IDirectMusicLoader8: */
extern void WINAPI IDirectMusicLoader8Impl_CollectGarbage (LPDIRECTMUSICLOADER8 iface);
extern HRESULT WINAPI IDirectMusicLoader8Impl_ReleaseObjectByUnknown (LPDIRECTMUSICLOADER8 iface, IUnknown* pObject);
extern HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClassID, REFIID iidInterfaceID, WCHAR* pwzFilePath, void** ppObject);
/*****************************************************************************
* IDirectMusicContainerImpl implementation structure
*/
struct IDirectMusicContainerImpl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicContainer);
DWORD ref;
/* IDirectMusicContainerImpl fields */
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicContainerImpl_QueryInterface (LPDIRECTMUSICCONTAINER iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicContainerImpl_AddRef (LPDIRECTMUSICCONTAINER iface);
extern ULONG WINAPI IDirectMusicContainerImpl_Release (LPDIRECTMUSICCONTAINER iface);
/* IDirectMusicContainer: */
extern HRESULT WINAPI IDirectMusicContainerImpl_EnumObject (LPDIRECTMUSICCONTAINER iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc, WCHAR* pwszAlias);
/*****************************************************************************
* IDirectMusicGetLoaderImpl implementation structure
*/
struct IDirectMusicGetLoaderImpl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicGetLoader);
DWORD ref;
/* IDirectMusicGetLoaderImpl fields */
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicGetLoaderImpl_QueryInterface (LPDIRECTMUSICGETLOADER iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicGetLoaderImpl_AddRef (LPDIRECTMUSICGETLOADER iface);
extern ULONG WINAPI IDirectMusicGetLoaderImpl_Release (LPDIRECTMUSICGETLOADER iface);
/* IDirectMusicGetLoader: */
extern HRESULT WINAPI IDirectMusicGetLoaderImpl_GetLoader (LPDIRECTMUSICGETLOADER iface, IDirectMusicLoader** ppLoader);
#endif /* __WINE_DMLOADER_PRIVATE_H */
/* IDirectMusicGetLoader Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "dmloader_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicGetLoader IUnknown parts follow: */
HRESULT WINAPI IDirectMusicGetLoaderImpl_QueryInterface (LPDIRECTMUSICGETLOADER iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicGetLoaderImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicGetLoader))
{
IDirectMusicGetLoaderImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicGetLoaderImpl_AddRef (LPDIRECTMUSICGETLOADER iface)
{
ICOM_THIS(IDirectMusicGetLoaderImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicGetLoaderImpl_Release (LPDIRECTMUSICGETLOADER iface)
{
ICOM_THIS(IDirectMusicGetLoaderImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicGetLoader Interface follow: */
HRESULT WINAPI IDirectMusicGetLoaderImpl_GetLoader (LPDIRECTMUSICGETLOADER iface, IDirectMusicLoader** ppLoader)
{
ICOM_THIS(IDirectMusicGetLoaderImpl,iface);
FIXME("(%p, %p): stub\n", This, ppLoader);
return S_OK;
}
ICOM_VTABLE(IDirectMusicGetLoader) DirectMusicGetLoader_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicGetLoaderImpl_QueryInterface,
IDirectMusicGetLoaderImpl_AddRef,
IDirectMusicGetLoaderImpl_Release,
IDirectMusicGetLoaderImpl_GetLoader
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicGetLoader (LPCGUID lpcGUID, LPDIRECTMUSICGETLOADER *ppDMGetLoad, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicGetLoader))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* IDirectMusicLoader Implementation /* IDirectMusicLoader8 Implementation
* IDirectMusicLoader8 Implementation
* IDirectMusicGetLoader Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003 Rok Mandeljc
* *
...@@ -26,7 +24,7 @@ ...@@ -26,7 +24,7 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "dmusic_private.h" #include "dmloader_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
...@@ -74,10 +72,8 @@ HRESULT WINAPI IDirectMusicLoader8Impl_GetObject (LPDIRECTMUSICLOADER8 iface, LP ...@@ -74,10 +72,8 @@ HRESULT WINAPI IDirectMusicLoader8Impl_GetObject (LPDIRECTMUSICLOADER8 iface, LP
FIXME("(%p, %p, %s, %p): stub\n", This, pDesc, debugstr_guid(riid), ppv); FIXME("(%p, %p, %s, %p): stub\n", This, pDesc, debugstr_guid(riid), ppv);
if (IsEqualGUID(riid, &IID_IDirectMusicScript)) { if (IsEqualGUID(riid, &IID_IDirectMusicScript)) {
IDirectMusicScriptImpl* script; IDirectMusicScript* script;
script = (IDirectMusicScriptImpl*) HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicScriptImpl)); CoCreateInstance (&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicScript, (void**)&script);
script->lpVtbl = &DirectMusicScript_Vtbl;
script->ref = 1;
*ppv = script; *ppv = script;
} }
...@@ -99,10 +95,10 @@ HRESULT WINAPI IDirectMusicLoader8Impl_SetSearchDirectory (LPDIRECTMUSICLOADER8 ...@@ -99,10 +95,10 @@ HRESULT WINAPI IDirectMusicLoader8Impl_SetSearchDirectory (LPDIRECTMUSICLOADER8
FIXME("(%p, %s, %p, %d): to check\n", This, debugstr_guid(rguidClass), pwzPath, fClear); FIXME("(%p, %s, %p, %d): to check\n", This, debugstr_guid(rguidClass), pwzPath, fClear);
if (0 == strncmpW(This->searchPath, pwzPath, MAX_PATH)) { if (0 == strncmpW(This->wzSearchPath, pwzPath, MAX_PATH)) {
return S_FALSE; return S_FALSE;
} }
strncpyW(This->searchPath, pwzPath, MAX_PATH); strncpyW(This->wzSearchPath, pwzPath, MAX_PATH);
return DS_OK; return DS_OK;
} }
...@@ -183,36 +179,24 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8 ...@@ -183,36 +179,24 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8
WCHAR* pwzFilePath, WCHAR* pwzFilePath,
void** ppObject) void** ppObject)
{ {
HANDLE fd;
ICOM_THIS(IDirectMusicLoader8Impl,iface); ICOM_THIS(IDirectMusicLoader8Impl,iface);
FIXME("(%p, %s, %s, %s, %p): stub\n", This, debugstr_guid(rguidClassID), debugstr_guid(iidInterfaceID), debugstr_w(pwzFilePath), ppObject); FIXME("(%p, %s, %s, %s, %p): stub\n", This, debugstr_guid(rguidClassID), debugstr_guid(iidInterfaceID), debugstr_w(pwzFilePath), ppObject);
fd = CreateFileW (pwzFilePath, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (!fd) {
WARN ("could not load file\n");
return DMUS_E_LOADER_FAILEDOPEN;
}
if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicAudioPathConfig)) { if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicAudioPathConfig)) {
FIXME("wanted 'aud'\n"); FIXME("wanted 'aud'\n");
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicBand)) { } else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicBand)) {
FIXME("wanted 'bnd'\n"); FIXME("wanted 'bnd'\n");
DMUSIC_FillBandFromFileHandle (NULL, fd);
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicContainer)) { } else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicContainer)) {
FIXME("wanted 'con'\n"); FIXME("wanted 'con'\n");
DMUSIC_FillContainerFromFileHandle (NULL, fd);
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicCollection)) { } else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicCollection)) {
FIXME("wanted 'dls'\n"); FIXME("wanted 'dls'\n");
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicChordMap)) { } else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicChordMap)) {
FIXME("wanted 'cdm'\n"); FIXME("wanted 'cdm'\n");
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicSegment)) { } else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicSegment)) {
FIXME("wanted 'sgt'\n"); FIXME("wanted 'sgt'\n");
DMUSIC_FillSegmentFromFileHandle (NULL, fd);
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicScript)) { } else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicScript)) {
FIXME("wanted 'spt'\n"); FIXME("wanted 'spt'\n");
DMUSIC_FillScriptFromFileHandle (NULL, fd);
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicSong)) { } else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicSong)) {
FIXME("wanted 'sng'\n"); FIXME("wanted 'sng'\n");
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicStyle)) { } else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicStyle)) {
...@@ -225,28 +209,20 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8 ...@@ -225,28 +209,20 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8
FIXME("wanted 'wav'\n"); FIXME("wanted 'wav'\n");
} }
CloseHandle (fd);
if (IsEqualGUID(iidInterfaceID, &IID_IDirectMusicSegment) || if (IsEqualGUID(iidInterfaceID, &IID_IDirectMusicSegment) ||
IsEqualGUID(iidInterfaceID, &IID_IDirectMusicSegment8)) { IsEqualGUID(iidInterfaceID, &IID_IDirectMusicSegment8)) {
IDirectMusicSegment8Impl* segment; IDirectMusicSegment8* segment;
segment = (IDirectMusicSegment8Impl*) HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicSegment8Impl)); CoCreateInstance (&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSegment8, (void**)&segment);
segment->lpVtbl = &DirectMusicSegment8_Vtbl;
segment->ref = 1;
*ppObject = segment; *ppObject = segment;
return S_OK; return S_OK;
} else if (IsEqualGUID(iidInterfaceID, &IID_IDirectMusicContainer)) { } else if (IsEqualGUID(iidInterfaceID, &IID_IDirectMusicContainer)) {
IDirectMusicContainerImpl* container; IDirectMusicContainer* container;
container = HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicContainerImpl)); CoCreateInstance (&CLSID_DirectMusicContainer, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicContainer, (void**)&container);
container->lpVtbl = &DirectMusicContainer_Vtbl;
container->ref = 1;
*ppObject = container; *ppObject = container;
return S_OK; return S_OK;
} else if (IsEqualGUID(iidInterfaceID, &IID_IDirectMusicScript)) { } else if (IsEqualGUID(iidInterfaceID, &IID_IDirectMusicScript)) {
IDirectMusicScriptImpl* script; IDirectMusicScript* script;
script = HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicScriptImpl)); CoCreateInstance (&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicScript, (void**)&script);
script->lpVtbl = &DirectMusicScript_Vtbl;
script->ref = 1;
*ppObject = script; *ppObject = script;
return S_OK; return S_OK;
} else { } else {
...@@ -277,80 +253,26 @@ ICOM_VTABLE(IDirectMusicLoader8) DirectMusicLoader8_Vtbl = ...@@ -277,80 +253,26 @@ ICOM_VTABLE(IDirectMusicLoader8) DirectMusicLoader8_Vtbl =
IDirectMusicLoader8Impl_LoadObjectFromFile IDirectMusicLoader8Impl_LoadObjectFromFile
}; };
HRESULT WINAPI DMUSIC_CreateDirectMusicLoader8 (LPCGUID lpcGUID, LPDIRECTMUSICLOADER8 *ppDMLoad8, LPUNKNOWN pUnkOuter) /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicLoader (LPCGUID lpcGUID, LPDIRECTMUSICLOADER8 *ppDMLoad, LPUNKNOWN pUnkOuter)
{ {
IDirectMusicLoader8Impl *dmloader8; IDirectMusicLoader8Impl *dmloader;
TRACE("(%p,%p,%p)\n",lpcGUID, ppDMLoad8, pUnkOuter); TRACE("(%p,%p,%p)\n",lpcGUID, ppDMLoad, pUnkOuter);
if (IsEqualGUID(lpcGUID, &IID_IDirectMusicLoader) || if (IsEqualGUID(lpcGUID, &IID_IDirectMusicLoader) ||
IsEqualGUID(lpcGUID, &IID_IDirectMusicLoader8)) IsEqualGUID(lpcGUID, &IID_IDirectMusicLoader8))
{ {
dmloader8 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoader8Impl)); dmloader = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoader8Impl));
if (NULL == dmloader8) { if (NULL == dmloader) {
*ppDMLoad8 = (LPDIRECTMUSICLOADER8)NULL; *ppDMLoad = (LPDIRECTMUSICLOADER8)NULL;
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
dmloader8->lpVtbl = &DirectMusicLoader8_Vtbl; dmloader->lpVtbl = &DirectMusicLoader8_Vtbl;
dmloader8->ref = 1; dmloader->ref = 1;
*ppDMLoad8 = (LPDIRECTMUSICLOADER8)dmloader8; *ppDMLoad = (LPDIRECTMUSICLOADER8)dmloader;
return S_OK; return S_OK;
} }
WARN("No interface found\n"); WARN("No interface found\n");
return E_NOINTERFACE; return E_NOINTERFACE;
} }
/* IDirectMusicGetLoader IUnknown parts follow: */
HRESULT WINAPI IDirectMusicGetLoaderImpl_QueryInterface (LPDIRECTMUSICGETLOADER iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicGetLoaderImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicGetLoader))
{
IDirectMusicGetLoaderImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicGetLoaderImpl_AddRef (LPDIRECTMUSICGETLOADER iface)
{
ICOM_THIS(IDirectMusicGetLoaderImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicGetLoaderImpl_Release (LPDIRECTMUSICGETLOADER iface)
{
ICOM_THIS(IDirectMusicGetLoaderImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicGetLoader Interface follow: */
HRESULT WINAPI IDirectMusicGetLoaderImpl_GetLoader (LPDIRECTMUSICGETLOADER iface, IDirectMusicLoader** ppLoader)
{
ICOM_THIS(IDirectMusicGetLoaderImpl,iface);
FIXME("(%p, %p): stub\n", This, ppLoader);
return S_OK;
}
ICOM_VTABLE(IDirectMusicGetLoader) DirectMusicGetLoader_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicGetLoaderImpl_QueryInterface,
IDirectMusicGetLoaderImpl_AddRef,
IDirectMusicGetLoaderImpl_Release,
IDirectMusicGetLoaderImpl_GetLoader
};
...@@ -3,13 +3,16 @@ TOPOBJDIR = ../.. ...@@ -3,13 +3,16 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = dmscript.dll MODULE = dmscript.dll
IMPORTS = dmusic kernel32 IMPORTS = ole32 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
dmscript_main.c dmscript_main.c \
regsvr.c \
script.c
RC_SRCS = version.rc RC_SRCS = version.rc
......
# Linked to main dmusic.dll for easier implementation 1 stdcall DllCanUnloadNow() DMSCRIPT_DllCanUnloadNow
2 stdcall DllGetClassObject(long long ptr) DMSCRIPT_DllGetClassObject
1 stdcall DllCanUnloadNow() dmusic.DllCanUnloadNow 3 stdcall DllRegisterServer() DMSCRIPT_DllRegisterServer
2 stdcall DllGetClassObject(long long ptr) dmusic.DllGetClassObject 4 stdcall DllUnregisterServer() DMSCRIPT_DllUnregisterServer
3 stdcall DllRegisterServer() dmusic.DllRegisterServer
4 stdcall DllUnregisterServer() dmusic.DllUnregisterServer
/* nothing here yet */ /* DirectMusicScript Main
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "dmscript_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/******************************************************************
* DirectMusicScript ClassFactory
*
*
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
static HRESULT WINAPI DMSCRCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI DMSCRCF_AddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DMSCRCF_Release(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI DMSCRCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualGUID (riid, &IID_IDirectMusicScript)) {
return DMUSIC_CreateDirectMusicScript (riid, (LPDIRECTMUSICSCRIPT*)ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static HRESULT WINAPI DMSCRCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) DMSCRCF_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
DMSCRCF_QueryInterface,
DMSCRCF_AddRef,
DMSCRCF_Release,
DMSCRCF_CreateInstance,
DMSCRCF_LockServer
};
static IClassFactoryImpl DMSCRIPT_CF = {&DMSCRCF_Vtbl, 1 };
/******************************************************************
* DllMain
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */
}
return TRUE;
}
/******************************************************************
* DllCanUnloadNow (DMSCRIPT.1)
*
*
*/
HRESULT WINAPI DMSCRIPT_DllCanUnloadNow(void)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/******************************************************************
* DllGetClassObject (DMSCRIPT.2)
*
*
*/
HRESULT WINAPI DMSCRIPT_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (&IID_IClassFactory, riid)) {
*ppv = (LPVOID) &DMSCRIPT_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
WARN("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/* DirectMusicScript Private Include
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __WINE_DMSCRIPT_PRIVATE_H
#define __WINE_DMSCRIPT_PRIVATE_H
#include "windef.h"
#include "wine/debug.h"
#include "winbase.h"
#include "winnt.h"
#include "dmusicc.h"
#include "dmusici.h"
#include "dmusics.h"
#include "dmplugin.h"
#include "dmusicf.h"
#include "dsound.h"
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicScriptImpl IDirectMusicScriptImpl;
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(IDirectMusicScript) DirectMusicScript_Vtbl;
/*****************************************************************************
* ClassFactory
*
* can support IID_IDirectMusicScript
* return always an IDirectMusicScriptImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicScript (LPCGUID lpcGUID, LPDIRECTMUSICSCRIPT* ppDMScript, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectMusicScriptImpl implementation structure
*/
struct IDirectMusicScriptImpl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicScript);
DWORD ref;
/* IDirectMusicScriptImpl fields */
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicScriptImpl_QueryInterface (LPDIRECTMUSICSCRIPT iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicScriptImpl_AddRef (LPDIRECTMUSICSCRIPT iface);
extern ULONG WINAPI IDirectMusicScriptImpl_Release (LPDIRECTMUSICSCRIPT iface);
/* IDirectMusicScript: */
extern HRESULT WINAPI IDirectMusicScriptImpl_Init (LPDIRECTMUSICSCRIPT iface, IDirectMusicPerformance* pPerformance, DMUS_SCRIPT_ERRORINFO* pErrorInfo);
extern HRESULT WINAPI IDirectMusicScriptImpl_CallRoutine (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszRoutineName, DMUS_SCRIPT_ERRORINFO* pErrorInfo);
extern HRESULT WINAPI IDirectMusicScriptImpl_SetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT varValue, BOOL fSetRef, DMUS_SCRIPT_ERRORINFO* pErrorInfo);
extern HRESULT WINAPI IDirectMusicScriptImpl_GetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT* pvarValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo);
extern HRESULT WINAPI IDirectMusicScriptImpl_SetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG lValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo);
extern HRESULT WINAPI IDirectMusicScriptImpl_GetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG* plValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo);
extern HRESULT WINAPI IDirectMusicScriptImpl_SetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, IUnknown* punkValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo);
extern HRESULT WINAPI IDirectMusicScriptImpl_GetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, REFIID riid, LPVOID* ppv, DMUS_SCRIPT_ERRORINFO* pErrorInfo);
extern HRESULT WINAPI IDirectMusicScriptImpl_EnumRoutine (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName);
extern HRESULT WINAPI IDirectMusicScriptImpl_EnumVariable (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName);
#endif /* __WINE_DMSCRIPT_PRIVATE_H */
/* IDirectMusicScript
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmscript_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicScript IUnknown parts follow: */
HRESULT WINAPI IDirectMusicScriptImpl_QueryInterface (LPDIRECTMUSICSCRIPT iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicScript))
{
IDirectMusicScriptImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicScriptImpl_AddRef (LPDIRECTMUSICSCRIPT iface)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicScriptImpl_Release (LPDIRECTMUSICSCRIPT iface)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicScript Interface follow: */
HRESULT WINAPI IDirectMusicScriptImpl_Init (LPDIRECTMUSICSCRIPT iface, IDirectMusicPerformance* pPerformance, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pPerformance, pErrorInfo);
return S_OK;
}
HRESULT WINAPI IDirectMusicScriptImpl_CallRoutine (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszRoutineName, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %s, %p): stub\n", This, debugstr_w(pwszRoutineName), pErrorInfo);
return S_OK;
}
HRESULT WINAPI IDirectMusicScriptImpl_SetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT varValue, BOOL fSetRef, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %p, FIXME, %d, %p): stub\n", This, pwszVariableName,/* varValue,*/ fSetRef, pErrorInfo);
return S_OK;
}
HRESULT WINAPI IDirectMusicScriptImpl_GetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT* pvarValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %p, %p, %p): stub\n", This, pwszVariableName, pvarValue, pErrorInfo);
return S_OK;
}
HRESULT WINAPI IDirectMusicScriptImpl_SetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG lValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %p, %li, %p): stub\n", This, pwszVariableName, lValue, pErrorInfo);
return S_OK;
}
HRESULT WINAPI IDirectMusicScriptImpl_GetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG* plValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %p, %p, %p): stub\n", This, pwszVariableName, plValue, pErrorInfo);
return S_OK;
}
HRESULT WINAPI IDirectMusicScriptImpl_SetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, IUnknown* punkValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %p, %p, %p): stub\n", This, pwszVariableName, punkValue, pErrorInfo);
return S_OK;
}
HRESULT WINAPI IDirectMusicScriptImpl_GetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, REFIID riid, LPVOID* ppv, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %p, %s, %p, %p): stub\n", This, pwszVariableName, debugstr_guid(riid), ppv, pErrorInfo);
return S_OK;
}
HRESULT WINAPI IDirectMusicScriptImpl_EnumRoutine (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
return S_OK;
}
HRESULT WINAPI IDirectMusicScriptImpl_EnumVariable (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName)
{
ICOM_THIS(IDirectMusicScriptImpl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
return S_OK;
}
ICOM_VTABLE(IDirectMusicScript) DirectMusicScript_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicScriptImpl_QueryInterface,
IDirectMusicScriptImpl_AddRef,
IDirectMusicScriptImpl_Release,
IDirectMusicScriptImpl_Init,
IDirectMusicScriptImpl_CallRoutine,
IDirectMusicScriptImpl_SetVariableVariant,
IDirectMusicScriptImpl_GetVariableVariant,
IDirectMusicScriptImpl_SetVariableNumber,
IDirectMusicScriptImpl_GetVariableNumber,
IDirectMusicScriptImpl_SetVariableObject,
IDirectMusicScriptImpl_GetVariableObject,
IDirectMusicScriptImpl_EnumRoutine,
IDirectMusicScriptImpl_EnumVariable
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicScript (LPCGUID lpcGUID, LPDIRECTMUSICSCRIPT* ppDMScript, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicScript))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
...@@ -3,13 +3,16 @@ TOPOBJDIR = ../.. ...@@ -3,13 +3,16 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = dmstyle.dll MODULE = dmstyle.dll
IMPORTS = dmusic kernel32 IMPORTS = ole32 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
dmstyle_main.c dmstyle_main.c \
style.c \
regsvr.c
RC_SRCS = version.rc RC_SRCS = version.rc
......
# Linked to main dmusic.dll for easier implementation 1 stdcall DllCanUnloadNow() DMSTYLE_DllCanUnloadNow
2 stdcall DllGetClassObject(long long ptr) DMSTYLE_DllGetClassObject
1 stdcall DllCanUnloadNow() dmusic.DllCanUnloadNow 3 stdcall DllRegisterServer() DMSTYLE_DllRegisterServer
2 stdcall DllGetClassObject(long long ptr) dmusic.DllGetClassObject 4 stdcall DllUnregisterServer() DMSTYLE_DllUnregisterServer
3 stdcall DllRegisterServer() dmusic.DllRegisterServer
4 stdcall DllUnregisterServer() dmusic.DllUnregisterServer
/* nothing here yet */ /* DirectMusicStyle Main
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "dmstyle_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/******************************************************************
* DirectMusicStyle ClassFactory
*
*
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
static HRESULT WINAPI DMSTYLCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI DMSTYLCF_AddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DMSTYLCF_Release(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI DMSTYLCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualGUID (riid, &IID_IDirectMusicStyle) ||
IsEqualGUID (riid, &IID_IDirectMusicStyle8)) {
return DMUSIC_CreateDirectMusicStyle (riid, (LPDIRECTMUSICSTYLE*)ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static HRESULT WINAPI DMSTYLCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) DMSTYLCF_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
DMSTYLCF_QueryInterface,
DMSTYLCF_AddRef,
DMSTYLCF_Release,
DMSTYLCF_CreateInstance,
DMSTYLCF_LockServer
};
static IClassFactoryImpl DMSTYLE_CF = {&DMSTYLCF_Vtbl, 1 };
/******************************************************************
* DllMain
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */
}
return TRUE;
}
/******************************************************************
* DllCanUnloadNow (DMSTYLE.1)
*
*
*/
HRESULT WINAPI DMSTYLE_DllCanUnloadNow(void)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/******************************************************************
* DllGetClassObject (DMSTYLE.2)
*
*
*/
HRESULT WINAPI DMSTYLE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (&IID_IClassFactory, riid)) {
*ppv = (LPVOID) &DMSTYLE_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
WARN("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/* DirectMusicStyle Private Include
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __WINE_DMSTYLE_PRIVATE_H
#define __WINE_DMSTYLE_PRIVATE_H
#include "windef.h"
#include "wine/debug.h"
#include "winbase.h"
#include "winnt.h"
#include "dmusicc.h"
#include "dmusici.h"
#include "dmusics.h"
#include "dmplugin.h"
#include "dmusicf.h"
#include "dsound.h"
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicStyle8Impl IDirectMusicStyle8Impl;
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(IDirectMusicStyle8) DirectMusicStyle8_Vtbl;
/*****************************************************************************
* ClassFactory
*
* can support IID_IDirectMusicStyle and IID_IDirectMusicStyle8
* return always an IDirectMusicStyle8Impl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicStyle (LPCGUID lpcGUID, LPDIRECTMUSICSTYLE* ppDMStyle, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectMusicStyle8Impl implementation structure
*/
struct IDirectMusicStyle8Impl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicStyle8);
DWORD ref;
/* IDirectMusicStyle8Impl fields */
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicStyle8Impl_QueryInterface (LPDIRECTMUSICSTYLE8 iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicStyle8Impl_AddRef (LPDIRECTMUSICSTYLE8 iface);
extern ULONG WINAPI IDirectMusicStyle8Impl_Release (LPDIRECTMUSICSTYLE8 iface);
/* IDirectMusicStyle: */
extern HRESULT WINAPI IDirectMusicStyle8Impl_GetBand (LPDIRECTMUSICSTYLE8 iface, WCHAR* pwszName, IDirectMusicBand** ppBand);
extern HRESULT WINAPI IDirectMusicStyle8Impl_EnumBand (LPDIRECTMUSICSTYLE8 iface, DWORD dwIndex, WCHAR* pwszName);
extern HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultBand (LPDIRECTMUSICSTYLE8 iface, IDirectMusicBand** ppBand);
extern HRESULT WINAPI IDirectMusicStyle8Impl_EnumMotif (LPDIRECTMUSICSTYLE8 iface, DWORD dwIndex, WCHAR* pwszName);
extern HRESULT WINAPI IDirectMusicStyle8Impl_GetMotif (LPDIRECTMUSICSTYLE8 iface, WCHAR* pwszName, IDirectMusicSegment** ppSegment);
extern HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultChordMap (LPDIRECTMUSICSTYLE8 iface, IDirectMusicChordMap** ppChordMap);
extern HRESULT WINAPI IDirectMusicStyle8Impl_EnumChordMap (LPDIRECTMUSICSTYLE8 iface, DWORD dwIndex, WCHAR* pwszName);
extern HRESULT WINAPI IDirectMusicStyle8Impl_GetChordMap (LPDIRECTMUSICSTYLE8 iface, WCHAR* pwszName, IDirectMusicChordMap** ppChordMap);
extern HRESULT WINAPI IDirectMusicStyle8Impl_GetTimeSignature (LPDIRECTMUSICSTYLE8 iface, DMUS_TIMESIGNATURE* pTimeSig);
extern HRESULT WINAPI IDirectMusicStyle8Impl_GetEmbellishmentLength (LPDIRECTMUSICSTYLE8 iface, DWORD dwType, DWORD dwLevel, DWORD* pdwMin, DWORD* pdwMax);
extern HRESULT WINAPI IDirectMusicStyle8Impl_GetTempo (LPDIRECTMUSICSTYLE8 iface, double* pTempo);
/* IDirectMusicStyle8: */
extern HRESULT WINAPI IDirectMusicStyle8ImplEnumPattern (LPDIRECTMUSICSTYLE8 iface, DWORD dwIndex, DWORD dwPatternType, WCHAR* pwszName);
#endif /* __WINE_DMSTYLE_PRIVATE_H */
/* IDirectMusicStyle Implementation /* IDirectMusicStyle8 Implementation
* IDirectMusicStyle8 Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003 Rok Mandeljc
* *
...@@ -24,7 +23,7 @@ ...@@ -24,7 +23,7 @@
#include "wingdi.h" #include "wingdi.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "dmusic_private.h" #include "dmstyle_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
...@@ -194,3 +193,17 @@ ICOM_VTABLE(IDirectMusicStyle8) DirectMusicStyle8_Vtbl = ...@@ -194,3 +193,17 @@ ICOM_VTABLE(IDirectMusicStyle8) DirectMusicStyle8_Vtbl =
IDirectMusicStyle8Impl_GetTempo, IDirectMusicStyle8Impl_GetTempo,
IDirectMusicStyle8ImplEnumPattern IDirectMusicStyle8ImplEnumPattern
}; };
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicStyle (LPCGUID lpcGUID, LPDIRECTMUSICSTYLE* ppDMStyle, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicStyle) ||
IsEqualGUID (lpcGUID, &IID_IDirectMusicStyle8))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
...@@ -3,13 +3,17 @@ TOPOBJDIR = ../.. ...@@ -3,13 +3,17 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = dmsynth.dll MODULE = dmsynth.dll
IMPORTS = dmusic kernel32 IMPORTS = winmm ole32 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
dmsynth_main.c dmsynth_main.c \
regsvr.c \
synth.c \
synthsink.c
RC_SRCS = version.rc RC_SRCS = version.rc
......
# Linked to main dmusic.dll for easier implementation 1 stdcall DllCanUnloadNow() DMSYNTH_DllCanUnloadNow
2 stdcall DllGetClassObject( long long ptr ) DMSYNTH_DllGetClassObject
1 stdcall DllCanUnloadNow() dmusic.DllCanUnloadNow 3 stdcall DllRegisterServer() DMSYNTH_DllRegisterServer
2 stdcall DllGetClassObject( long long ptr ) dmusic.DllGetClassObject 4 stdcall DllUnregisterServer() DMSYNTH_DllUnregisterServer
3 stdcall DllRegisterServer() dmusic.DllRegisterServer
4 stdcall DllUnregisterServer() dmusic.DllUnregisterServer
/* nothing here yet */ /* DirectMusicSynthesizer Main
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "dmsynth_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/******************************************************************
* DirectMusicSynthesizer ClassFactory
*
*
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
static HRESULT WINAPI DMSYCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI DMSYCF_AddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DMSYCF_Release(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI DMSYCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualGUID (riid, &IID_IDirectMusicSynth) ||
IsEqualGUID (riid, &IID_IDirectMusicSynth8)) {
return DMUSIC_CreateDirectMusicSynth (riid, (LPDIRECTMUSICSYNTH8*)ppobj, pOuter);
} else if (IsEqualGUID (riid, &IID_IDirectMusicSynthSink)) {
return DMUSIC_CreateDirectMusicSynthSink (riid, (LPDIRECTMUSICSYNTHSINK*)ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static HRESULT WINAPI DMSYCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) DMSYCF_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
DMSYCF_QueryInterface,
DMSYCF_AddRef,
DMSYCF_Release,
DMSYCF_CreateInstance,
DMSYCF_LockServer
};
static IClassFactoryImpl DMSYNTH_CF = {&DMSYCF_Vtbl, 1 };
/******************************************************************
* DllMain
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */
}
return TRUE;
}
/******************************************************************
* DllCanUnloadNow (DMSYNTH.1)
*
*
*/
HRESULT WINAPI DMSYNTH_DllCanUnloadNow(void)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/******************************************************************
* DllGetClassObject (DMSYNTH.2)
*
*
*/
HRESULT WINAPI DMSYNTH_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (&IID_IClassFactory, riid)) {
*ppv = (LPVOID) &DMSYNTH_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
WARN("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/* DirectMusicSynthesizer Private Include
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __WINE_DMSYNTH_PRIVATE_H
#define __WINE_DMSYNTH_PRIVATE_H
#include "windef.h"
#include "wine/debug.h"
#include "winbase.h"
#include "winnt.h"
#include "dmusicc.h"
#include "dmusici.h"
#include "dmusics.h"
#include "dmplugin.h"
#include "dmusicf.h"
#include "dsound.h"
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicSynth8Impl IDirectMusicSynth8Impl;
typedef struct IDirectMusicSynthSinkImpl IDirectMusicSynthSinkImpl;
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(IDirectMusicSynth8) DirectMusicSynth8_Vtbl;
extern ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl;
/*****************************************************************************
* ClassFactory
*/
/* can support IID_IDirectMusicSynth and IID_IDirectMusicSynth8
* return always an IDirectMusicSynthImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynth (LPCGUID lpcGUID, LPDIRECTMUSICSYNTH8* ppDMSynth, LPUNKNOWN pUnkOuter);
/* can support IID_IDirectMusicSynthSink
* return always an IDirectMusicSynthSinkImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSink (LPCGUID lpcGUID, LPDIRECTMUSICSYNTHSINK* ppDMSynthSink, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectMusicSynth8Impl implementation structure
*/
struct IDirectMusicSynth8Impl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicSynth8);
DWORD ref;
/* IDirectMusicSynth8 fields */
DMUS_PORTCAPS pCaps;
BOOL fActive;
IReferenceClock* pLatencyClock;
IDirectMusicSynthSinkImpl* pSynthSink;
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface (LPDIRECTMUSICSYNTH8 iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicSynth8Impl_AddRef (LPDIRECTMUSICSYNTH8 iface);
extern ULONG WINAPI IDirectMusicSynth8Impl_Release (LPDIRECTMUSICSYNTH8 iface);
/* IDirectMusicSynth: */
extern HRESULT WINAPI IDirectMusicSynth8Impl_Open (LPDIRECTMUSICSYNTH8 iface, LPDMUS_PORTPARAMS pPortParams);
extern HRESULT WINAPI IDirectMusicSynth8Impl_Close (LPDIRECTMUSICSYNTH8 iface);
extern HRESULT WINAPI IDirectMusicSynth8Impl_SetNumChannelGroups (LPDIRECTMUSICSYNTH8 iface, DWORD dwGroups);
extern HRESULT WINAPI IDirectMusicSynth8Impl_Download (LPDIRECTMUSICSYNTH8 iface, LPHANDLE phDownload, LPVOID pvData, LPBOOL pbFree);
extern HRESULT WINAPI IDirectMusicSynth8Impl_Unload (LPDIRECTMUSICSYNTH8 iface, HANDLE hDownload, HRESULT (CALLBACK* lpFreeHandle)(HANDLE,HANDLE), HANDLE hUserData);
extern HRESULT WINAPI IDirectMusicSynth8Impl_PlayBuffer (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, LPBYTE pbBuffer, DWORD cbBuffer);
extern HRESULT WINAPI IDirectMusicSynth8Impl_GetRunningStats (LPDIRECTMUSICSYNTH8 iface, LPDMUS_SYNTHSTATS pStats);
extern HRESULT WINAPI IDirectMusicSynth8Impl_GetPortCaps (LPDIRECTMUSICSYNTH8 iface, LPDMUS_PORTCAPS pCaps);
extern HRESULT WINAPI IDirectMusicSynth8Impl_SetMasterClock (LPDIRECTMUSICSYNTH8 iface, IReferenceClock* pClock);
extern HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock (LPDIRECTMUSICSYNTH8 iface, IReferenceClock** ppClock);
extern HRESULT WINAPI IDirectMusicSynth8Impl_Activate (LPDIRECTMUSICSYNTH8 iface, BOOL fEnable);
extern HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink (LPDIRECTMUSICSYNTH8 iface, IDirectMusicSynthSink* pSynthSink);
extern HRESULT WINAPI IDirectMusicSynth8Impl_Render (LPDIRECTMUSICSYNTH8 iface, short* pBuffer, DWORD dwLength, LONGLONG llPosition);
extern HRESULT WINAPI IDirectMusicSynth8Impl_SetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority);
extern HRESULT WINAPI IDirectMusicSynth8Impl_GetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority);
extern HRESULT WINAPI IDirectMusicSynth8Impl_GetFormat (LPDIRECTMUSICSYNTH8 iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSiz);
extern HRESULT WINAPI IDirectMusicSynth8Impl_GetAppend (LPDIRECTMUSICSYNTH8 iface, DWORD* pdwAppend);
/* IDirectMusicSynth8: */
extern HRESULT WINAPI IDirectMusicSynth8Impl_PlayVoice (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, DWORD dwVoiceId, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwDLId, long prPitch, long vrVolume, SAMPLE_TIME stVoiceStart, SAMPLE_TIME stLoopStart, SAMPLE_TIME stLoopEnd);
extern HRESULT WINAPI IDirectMusicSynth8Impl_StopVoice (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, DWORD dwVoiceId);
extern HRESULT WINAPI IDirectMusicSynth8Impl_GetVoiceState (LPDIRECTMUSICSYNTH8 iface, DWORD dwVoice[], DWORD cbVoice, DMUS_VOICE_STATE dwVoiceState[]);
extern HRESULT WINAPI IDirectMusicSynth8Impl_Refresh (LPDIRECTMUSICSYNTH8 iface, DWORD dwDownloadID, DWORD dwFlags);
extern HRESULT WINAPI IDirectMusicSynth8Impl_AssignChannelToBuses (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwBuses, DWORD cBuses);
/*****************************************************************************
* IDirectMusicSynthSinkImpl implementation structure
*/
struct IDirectMusicSynthSinkImpl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicSynthSink);
DWORD ref;
/* IDirectMusicSynthSinkImpl fields */
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface);
extern ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface);
/* IDirectMusicSynthSinkImpl: */
extern HRESULT WINAPI IDirectMusicSynthSinkImpl_Init (LPDIRECTMUSICSYNTHSINK iface, IDirectMusicSynth* pSynth);
extern HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock* pClock);
extern HRESULT WINAPI IDirectMusicSynthSinkImpl_GetLatencyClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock** ppClock);
extern HRESULT WINAPI IDirectMusicSynthSinkImpl_Activate (LPDIRECTMUSICSYNTHSINK iface, BOOL fEnable);
extern HRESULT WINAPI IDirectMusicSynthSinkImpl_SampleToRefTime (LPDIRECTMUSICSYNTHSINK iface, LONGLONG llSampleTime, REFERENCE_TIME* prfTime);
extern HRESULT WINAPI IDirectMusicSynthSinkImpl_RefTimeToSample (LPDIRECTMUSICSYNTHSINK iface, REFERENCE_TIME rfTime, LONGLONG* pllSampleTime);
extern HRESULT WINAPI IDirectMusicSynthSinkImpl_SetDirectSound (LPDIRECTMUSICSYNTHSINK iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer);
extern HRESULT WINAPI IDirectMusicSynthSinkImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNTHSINK iface, LPDWORD pdwBufferSizeInSamples);
#endif /* __WINE_DMSYNTH_PRIVATE_H */
/* IDirectMusicSynth Implementation /* IDirectMusicSynth8 Implementation
* IDirectMusicSynth8 Implementation
* IDirectMusicSynthSink Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003 Rok Mandeljc
* *
...@@ -24,8 +22,9 @@ ...@@ -24,8 +22,9 @@
#include "winuser.h" #include "winuser.h"
#include "wingdi.h" #include "wingdi.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "winnls.h"
#include "dmusic_private.h" #include "dmsynth_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
...@@ -115,7 +114,7 @@ HRESULT WINAPI IDirectMusicSynth8Impl_PlayBuffer (LPDIRECTMUSICSYNTH8 iface, REF ...@@ -115,7 +114,7 @@ HRESULT WINAPI IDirectMusicSynth8Impl_PlayBuffer (LPDIRECTMUSICSYNTH8 iface, REF
{ {
ICOM_THIS(IDirectMusicSynth8Impl,iface); ICOM_THIS(IDirectMusicSynth8Impl,iface);
FIXME("(%p, FIXME, %p, %ld): stub\n", This/*, rt*/, pbBuffer, cbBuffer); FIXME("(%p, %lli, %p, %ld): stub\n", This, rt, pbBuffer, cbBuffer);
return S_OK; return S_OK;
} }
...@@ -133,7 +132,8 @@ HRESULT WINAPI IDirectMusicSynth8Impl_GetPortCaps (LPDIRECTMUSICSYNTH8 iface, LP ...@@ -133,7 +132,8 @@ HRESULT WINAPI IDirectMusicSynth8Impl_GetPortCaps (LPDIRECTMUSICSYNTH8 iface, LP
{ {
ICOM_THIS(IDirectMusicSynth8Impl,iface); ICOM_THIS(IDirectMusicSynth8Impl,iface);
FIXME("(%p, %p): stub\n", This, pCaps); TRACE("(%p, %p)\n", This, pCaps);
*pCaps = This->pCaps;
return S_OK; return S_OK;
} }
...@@ -151,7 +151,8 @@ HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock (LPDIRECTMUSICSYNTH8 iface ...@@ -151,7 +151,8 @@ HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock (LPDIRECTMUSICSYNTH8 iface
{ {
ICOM_THIS(IDirectMusicSynth8Impl,iface); ICOM_THIS(IDirectMusicSynth8Impl,iface);
FIXME("(%p, %p): stub\n", This, ppClock); TRACE("(%p, %p)\n", This, ppClock);
*ppClock = This->pLatencyClock;
return S_OK; return S_OK;
} }
...@@ -160,7 +161,8 @@ HRESULT WINAPI IDirectMusicSynth8Impl_Activate (LPDIRECTMUSICSYNTH8 iface, BOOL ...@@ -160,7 +161,8 @@ HRESULT WINAPI IDirectMusicSynth8Impl_Activate (LPDIRECTMUSICSYNTH8 iface, BOOL
{ {
ICOM_THIS(IDirectMusicSynth8Impl,iface); ICOM_THIS(IDirectMusicSynth8Impl,iface);
FIXME("(%p, %d): stub\n", This, fEnable); TRACE("(%p, %d)\n", This, fEnable);
This->fActive = fEnable;
return S_OK; return S_OK;
} }
...@@ -169,7 +171,8 @@ HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink (LPDIRECTMUSICSYNTH8 iface, I ...@@ -169,7 +171,8 @@ HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink (LPDIRECTMUSICSYNTH8 iface, I
{ {
ICOM_THIS(IDirectMusicSynth8Impl,iface); ICOM_THIS(IDirectMusicSynth8Impl,iface);
FIXME("(%p, %p): stub\n", This, pSynthSink); TRACE("(%p, %p)\n", This, pSynthSink);
This->pSynthSink = (IDirectMusicSynthSinkImpl*)pSynthSink;
return S_OK; return S_OK;
} }
...@@ -178,16 +181,17 @@ HRESULT WINAPI IDirectMusicSynth8Impl_Render (LPDIRECTMUSICSYNTH8 iface, short* ...@@ -178,16 +181,17 @@ HRESULT WINAPI IDirectMusicSynth8Impl_Render (LPDIRECTMUSICSYNTH8 iface, short*
{ {
ICOM_THIS(IDirectMusicSynth8Impl,iface); ICOM_THIS(IDirectMusicSynth8Impl,iface);
FIXME("(%p, %p, %ld, FIXME): stub\n", This, pBuffer, dwLength/*, llPosition*/); FIXME("(%p, %p, %ld, %lli): stub\n", This, pBuffer, dwLength, llPosition);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSynth8Impl_SetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) HRESULT WINAPI IDirectMusicSynth8Impl_SetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority)
{ {
ICOM_THIS(IDirectMusicSynth8Impl,iface); /*ICOM_THIS(IDirectMusicSynth8Impl,iface); */
FIXME("(%p, %ld, %ld, %ld): stub\n", This, dwChannelGroup, dwChannel, dwPriority); /* silenced because of too many messages - 1000 groups * 16 channels ;=) */
/*FIXME("(%p, %ld, %ld, %ld): stub\n", This, dwChannelGroup, dwChannel, dwPriority); */
return S_OK; return S_OK;
} }
...@@ -224,7 +228,7 @@ HRESULT WINAPI IDirectMusicSynth8Impl_PlayVoice (LPDIRECTMUSICSYNTH8 iface, REFE ...@@ -224,7 +228,7 @@ HRESULT WINAPI IDirectMusicSynth8Impl_PlayVoice (LPDIRECTMUSICSYNTH8 iface, REFE
{ {
ICOM_THIS(IDirectMusicSynth8Impl,iface); ICOM_THIS(IDirectMusicSynth8Impl,iface);
FIXME("(%p, FIXME, %ld, %ld, %ld, %ld, %li, %li, FIXME, FIXME, FIXME): stub\n", This/*, rt*/, dwVoiceId, dwChannelGroup, dwChannel, dwDLId, prPitch, vrVolume/*, stVoiceStart, stLoopStart, stLoopEnd*/); FIXME("(%p, %lli, %ld, %ld, %ld, %ld, %li, %li,%lli, %lli, %lli): stub\n", This, rt, dwVoiceId, dwChannelGroup, dwChannel, dwDLId, prPitch, vrVolume, stVoiceStart, stLoopStart, stLoopEnd);
return S_OK; return S_OK;
} }
...@@ -233,7 +237,7 @@ HRESULT WINAPI IDirectMusicSynth8Impl_StopVoice (LPDIRECTMUSICSYNTH8 iface, REFE ...@@ -233,7 +237,7 @@ HRESULT WINAPI IDirectMusicSynth8Impl_StopVoice (LPDIRECTMUSICSYNTH8 iface, REFE
{ {
ICOM_THIS(IDirectMusicSynth8Impl,iface); ICOM_THIS(IDirectMusicSynth8Impl,iface);
FIXME("(%p, FIXME, %ld): stub\n", This/*, rt*/, dwVoiceId); FIXME("(%p, %lli, %ld): stub\n", This, rt, dwVoiceId);
return S_OK; return S_OK;
} }
...@@ -295,127 +299,40 @@ ICOM_VTABLE(IDirectMusicSynth8) DirectMusicSynth8_Vtbl = ...@@ -295,127 +299,40 @@ ICOM_VTABLE(IDirectMusicSynth8) DirectMusicSynth8_Vtbl =
IDirectMusicSynth8Impl_AssignChannelToBuses IDirectMusicSynth8Impl_AssignChannelToBuses
}; };
/* for ClassFactory */
/* IDirectMusicSynthSink IUnknown parts follow: */ HRESULT WINAPI DMUSIC_CreateDirectMusicSynth (LPCGUID lpcGUID, LPDIRECTMUSICSYNTH8* ppDMSynth, LPUNKNOWN pUnkOuter)
HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj)
{ {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); IDirectMusicSynth8Impl *dmsynth;
if (IsEqualGUID(riid, &IID_IUnknown) || TRACE("(%p,%p,%p)\n", lpcGUID, ppDMSynth, pUnkOuter);
IsEqualGUID(riid, &IID_IDirectMusicSynthSink)) if (IsEqualGUID (lpcGUID, &IID_IDirectMusicSynth) ||
{ IsEqualGUID (lpcGUID, &IID_IDirectMusicSynth8)) {
IDirectMusicSynthSinkImpl_AddRef(iface); dmsynth = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSynth8Impl));
*ppobj = This; if (NULL == dmsynth) {
return S_OK; *ppDMSynth = (LPDIRECTMUSICSYNTH8) NULL;
} return E_OUTOFMEMORY;
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
} }
return ref; dmsynth->lpVtbl = &DirectMusicSynth8_Vtbl;
} dmsynth->ref = 1;
/* fill in caps */
/* IDirectMusicSynth Interface follow: */ dmsynth->pCaps.dwSize = sizeof(DMUS_PORTCAPS);
HRESULT WINAPI IDirectMusicSinkSynthImpl_Init (LPDIRECTMUSICSYNTHSINK iface, IDirectMusicSynth* pSynth) dmsynth->pCaps.dwFlags = DMUS_PC_DLS | DMUS_PC_SOFTWARESYNTH | DMUS_PC_DIRECTSOUND | DMUS_PC_DLS2 | DMUS_PC_AUDIOPATH | DMUS_PC_WAVE;
{ dmsynth->pCaps.guidPort = CLSID_DirectMusicSynth;
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); dmsynth->pCaps.dwClass = DMUS_PC_OUTPUTCLASS;
dmsynth->pCaps.dwType = DMUS_PORT_WINMM_DRIVER;
FIXME("(%p, %p): stub\n", This, pSynth); dmsynth->pCaps.dwMemorySize = DMUS_PC_SYSTEMMEMORY;
dmsynth->pCaps.dwMaxChannelGroups = 1000;
return S_OK; dmsynth->pCaps.dwMaxVoices = 1000;
} dmsynth->pCaps.dwMaxAudioChannels = -1;
dmsynth->pCaps.dwEffectFlags = DMUS_EFFECT_REVERB | DMUS_EFFECT_CHORUS | DMUS_EFFECT_DELAY;
HRESULT WINAPI IDirectMusicSinkSynthImpl_SetMasterClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock* pClock) MultiByteToWideChar (CP_ACP, 0, "Microsotf Synthesizer", -1, dmsynth->pCaps.wszDescription, sizeof(dmsynth->pCaps.wszDescription)/sizeof(WCHAR));
{ /* assign latency clock */
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); /*DMUSIC_CreateReferenceClock (&IID_IReferenceClock, (LPREFERENCECLOCK*)&This->pLatencyClock, NULL); */
FIXME("(%p, %p): stub\n", This, pClock); *ppDMSynth = (LPDIRECTMUSICSYNTH8) dmsynth;
return S_OK;
}
HRESULT WINAPI IDirectMusicSinkSynthImpl_GetLatencyClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock** ppClock)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, ppClock);
return S_OK;
}
HRESULT WINAPI IDirectMusicSinkSynthImpl_Activate (LPDIRECTMUSICSYNTHSINK iface, BOOL fEnable)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %d): stub\n", This, fEnable);
return S_OK;
}
HRESULT WINAPI IDirectMusicSinkSynthImpl_SampleToRefTime (LPDIRECTMUSICSYNTHSINK iface, LONGLONG llSampleTime, REFERENCE_TIME* prfTime)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, FIXME, %p): stub\n", This/*, llSampleTime*/, prfTime);
return S_OK;
}
HRESULT WINAPI IDirectMusicSinkSynthImpl_RefTimeToSample (LPDIRECTMUSICSYNTHSINK iface, REFERENCE_TIME rfTime, LONGLONG* pllSampleTime)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, FIXME, %p): stub\n", This/*, rfTime*/, pllSampleTime );
return S_OK;
}
HRESULT WINAPI IDirectMusicSinkSynthImpl_SetDirectSound (LPDIRECTMUSICSYNTHSINK iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pDirectSound, pDirectSoundBuffer);
return S_OK; return S_OK;
} }
WARN("No interface found\n");
HRESULT WINAPI IDirectMusicSinkSynthImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNTHSINK iface, LPDWORD pdwBufferSizeInSamples)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pdwBufferSizeInSamples);
return S_OK; return E_NOINTERFACE;
} }
ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicSynthSinkImpl_QueryInterface,
IDirectMusicSynthSinkImpl_AddRef,
IDirectMusicSynthSinkImpl_Release,
IDirectMusicSinkSynthImpl_Init,
IDirectMusicSinkSynthImpl_SetMasterClock,
IDirectMusicSinkSynthImpl_GetLatencyClock,
IDirectMusicSinkSynthImpl_Activate,
IDirectMusicSinkSynthImpl_SampleToRefTime,
IDirectMusicSinkSynthImpl_RefTimeToSample,
IDirectMusicSinkSynthImpl_SetDirectSound,
IDirectMusicSinkSynthImpl_GetDesiredBufferSize
};
/* IDirectMusicSynthSink Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmsynth_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicSynthSink IUnknown parts follow: */
HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicSynthSink))
{
IDirectMusicSynthSinkImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicSynth Interface follow: */
HRESULT WINAPI IDirectMusicSynthSinkImpl_Init (LPDIRECTMUSICSYNTHSINK iface, IDirectMusicSynth* pSynth)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pSynth);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock* pClock)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pClock);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_GetLatencyClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock** ppClock)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, ppClock);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_Activate (LPDIRECTMUSICSYNTHSINK iface, BOOL fEnable)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %d): stub\n", This, fEnable);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_SampleToRefTime (LPDIRECTMUSICSYNTHSINK iface, LONGLONG llSampleTime, REFERENCE_TIME* prfTime)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %lli, %p): stub\n", This, llSampleTime, prfTime);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_RefTimeToSample (LPDIRECTMUSICSYNTHSINK iface, REFERENCE_TIME rfTime, LONGLONG* pllSampleTime)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %lli, %p): stub\n", This, rfTime, pllSampleTime );
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_SetDirectSound (LPDIRECTMUSICSYNTHSINK iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pDirectSound, pDirectSoundBuffer);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNTHSINK iface, LPDWORD pdwBufferSizeInSamples)
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pdwBufferSizeInSamples);
return S_OK;
}
ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicSynthSinkImpl_QueryInterface,
IDirectMusicSynthSinkImpl_AddRef,
IDirectMusicSynthSinkImpl_Release,
IDirectMusicSynthSinkImpl_Init,
IDirectMusicSynthSinkImpl_SetMasterClock,
IDirectMusicSynthSinkImpl_GetLatencyClock,
IDirectMusicSynthSinkImpl_Activate,
IDirectMusicSynthSinkImpl_SampleToRefTime,
IDirectMusicSynthSinkImpl_RefTimeToSample,
IDirectMusicSynthSinkImpl_SetDirectSound,
IDirectMusicSynthSinkImpl_GetDesiredBufferSize
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSink (LPCGUID lpcGUID, LPDIRECTMUSICSYNTHSINK* ppDMSynthSink, LPUNKNOWN pUnkOuter)
{
IDirectMusicSynthSinkImpl *dmsink;
TRACE("(%p,%p,%p)\n", lpcGUID, ppDMSynthSink, pUnkOuter);
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicSynthSink)) {
dmsink = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSynthSinkImpl));
if (NULL == dmsink) {
*ppDMSynthSink = (LPDIRECTMUSICSYNTHSINK) NULL;
return E_OUTOFMEMORY;
}
dmsink->lpVtbl = &DirectMusicSynthSink_Vtbl;
dmsink->ref = 1;
*ppDMSynthSink = (LPDIRECTMUSICSYNTHSINK) dmsink;
return S_OK;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
...@@ -3,26 +3,27 @@ TOPOBJDIR = ../.. ...@@ -3,26 +3,27 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = dmusic.dll MODULE = dmusic.dll
IMPORTS = dsound winmm ole32 user32 advapi32 kernel32 IMPORTS = winmm ole32 msacm32 dsound rpcrt4 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID) EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
buffer.c \
clock.c \
collection.c \
dmusic.c \ dmusic.c \
dmusic_instrument.c \
dmusic_loader.c \
dmusic_main.c \ dmusic_main.c \
dmusic_misc.c \ download.c \
dmusic_performance.c \ downloadedinstrument.c \
dmusic_plugins.c \
dmusic_port.c \
dmusic_segment.c \
dmusic_style.c \
dmusic_synth.c \
helper.c \ helper.c \
regsvr.c instrument.c \
object.c \
port.c \
portdownload.c \
regsvr.c \
thru.c
RC_SRCS = version.rc RC_SRCS = version.rc
......
/* IDirectMusicBuffer Implementation
*
* Copyright (C) 2003 Rok Mandeljc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "mmsystem.h"
#include "winternl.h"
#include "mmddk.h"
#include "wine/windef16.h"
#include "wine/winbase16.h"
#include "wine/debug.h"
#include "dsound.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicBuffer IUnknown parts follow: */
HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface (LPDIRECTMUSICBUFFER iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicBuffer))
{
IDirectMusicBufferImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicBufferImpl_AddRef (LPDIRECTMUSICBUFFER iface)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0)
{
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* IDirectMusicBuffer Interface follow: */
HRESULT WINAPI IDirectMusicBufferImpl_Flush (LPDIRECTMUSICBUFFER iface)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p): stub\n", This);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_TotalTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prtTime)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, prtTime);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_PackStructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %lli, %ld, %ld): stub\n", This, rt, dwChannelGroup, dwChannelMessage);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %lli, %ld, %ld, %p): stub\n", This, rt, dwChannelGroup, cb, lpb);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_ResetReadPtr (LPDIRECTMUSICBUFFER iface)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p): stub\n", This);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetNextEvent (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE* ppData)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p, %p, %p, %p): stub\n", This, prt, pdwChannelGroup, pdwLength, ppData);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetRawBufferPtr (LPDIRECTMUSICBUFFER iface, LPBYTE* ppData)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, ppData);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetStartTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, prt);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetUsedBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, pcb);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetMaxBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, pcb);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetBufferFormat (LPDIRECTMUSICBUFFER iface, LPGUID pGuidFormat)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, pGuidFormat);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_SetStartTime (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %lli): stub\n", This, rt);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, DWORD cb)
{
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %ld): stub\n", This, cb);
return S_OK;
}
ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicBufferImpl_QueryInterface,
IDirectMusicBufferImpl_AddRef,
IDirectMusicBufferImpl_Release,
IDirectMusicBufferImpl_Flush,
IDirectMusicBufferImpl_TotalTime,
IDirectMusicBufferImpl_PackStructured,
IDirectMusicBufferImpl_PackUnstructured,
IDirectMusicBufferImpl_ResetReadPtr,
IDirectMusicBufferImpl_GetNextEvent,
IDirectMusicBufferImpl_GetRawBufferPtr,
IDirectMusicBufferImpl_GetStartTime,
IDirectMusicBufferImpl_GetUsedBytes,
IDirectMusicBufferImpl_GetMaxBytes,
IDirectMusicBufferImpl_GetBufferFormat,
IDirectMusicBufferImpl_SetStartTime,
IDirectMusicBufferImpl_SetUsedBytes
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicBuffer (LPCGUID lpcGUID, LPDIRECTMUSICBUFFER* ppDMBuff, LPUNKNOWN pUnkOuter)
{
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicBuffer))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment