Commit 0382ea1d authored by Rok Mandeljc's avatar Rok Mandeljc Committed by Alexandre Julliard

- updated resources to DX9

- completely rewritten headers (DX9 compat.; look much nicer now ;=) - removed IDirectMusicSong and IDirectMusicMelodyFormulationTrack (which are removed from DX9; weren't implemented in DX8 anyway) - combined/simplified IDirectMusicSomething / IDirectMusicObject / IPersistStream for objects that support loading - implemented IDirectMusicObject on all such objects; via generic functions - combined IDirectMusicTrack(8)/IPersistStream on all tracks - fully implemented IDirectMusicContainer (at least 90% if there are no private interfaces) - implemented IDirectMusicCollection (99% work & MS compliant behaviour; except for instruments) - tried to implement IDirectMusicInstrument (unfortunately uses some dirty private interfaces... :( - added dswave.dll; DirectMusic Wave - some changes in style - many, many more ;)
parent 236c8a24
...@@ -1498,6 +1498,7 @@ dlls/dplayx/Makefile ...@@ -1498,6 +1498,7 @@ dlls/dplayx/Makefile
dlls/dpnhpast/Makefile dlls/dpnhpast/Makefile
dlls/dsound/Makefile dlls/dsound/Makefile
dlls/dsound/tests/Makefile dlls/dsound/tests/Makefile
dlls/dswave/Makefile
dlls/gdi/Makefile dlls/gdi/Makefile
dlls/gdi/tests/Makefile dlls/gdi/tests/Makefile
dlls/glu32/Makefile dlls/glu32/Makefile
......
...@@ -46,6 +46,7 @@ BASEDIRS = \ ...@@ -46,6 +46,7 @@ BASEDIRS = \
dplayx \ dplayx \
dpnhpast \ dpnhpast \
dsound \ dsound \
dswave \
gdi \ gdi \
iccvid \ iccvid \
icmp \ icmp \
...@@ -239,6 +240,7 @@ SYMLINKS = \ ...@@ -239,6 +240,7 @@ SYMLINKS = \
dplayx.dll$(DLLEXT) \ dplayx.dll$(DLLEXT) \
dpnhpast.dll$(DLLEXT) \ dpnhpast.dll$(DLLEXT) \
dsound.dll$(DLLEXT) \ dsound.dll$(DLLEXT) \
dswave.dll$(DLLEXT) \
gdi32.dll$(DLLEXT) \ gdi32.dll$(DLLEXT) \
iccvid.dll$(DLLEXT) \ iccvid.dll$(DLLEXT) \
icmp.dll$(DLLEXT) \ icmp.dll$(DLLEXT) \
...@@ -446,6 +448,9 @@ dpnhpast.dll$(DLLEXT): dpnhpast/dpnhpast.dll$(DLLEXT) ...@@ -446,6 +448,9 @@ dpnhpast.dll$(DLLEXT): dpnhpast/dpnhpast.dll$(DLLEXT)
dsound.dll$(DLLEXT): dsound/dsound.dll$(DLLEXT) dsound.dll$(DLLEXT): dsound/dsound.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dsound/dsound.dll$(DLLEXT) $@ $(RM) $@ && $(LN_S) dsound/dsound.dll$(DLLEXT) $@
dswave.dll$(DLLEXT): dswave/dswave.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dswave/dswave.dll$(DLLEXT) $@
gdi32.dll$(DLLEXT): gdi/gdi32.dll$(DLLEXT) gdi32.dll$(DLLEXT): gdi/gdi32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) gdi/gdi32.dll$(DLLEXT) $@ $(RM) $@ && $(LN_S) gdi/gdi32.dll$(DLLEXT) $@
...@@ -840,6 +845,7 @@ IMPORT_LIBS = \ ...@@ -840,6 +845,7 @@ IMPORT_LIBS = \
libdplayx \ libdplayx \
libdpnhpast \ libdpnhpast \
libdsound \ libdsound \
libdswave \
libgdi32 \ libgdi32 \
libglu32 \ libglu32 \
libglut32 \ libglut32 \
...@@ -1086,6 +1092,11 @@ libdsound.def: dsound/dsound.spec.def ...@@ -1086,6 +1092,11 @@ libdsound.def: dsound/dsound.spec.def
libdsound.a: dsound/dsound.spec.def libdsound.a: dsound/dsound.spec.def
$(DLLTOOL) -k -l $@ -d dsound/dsound.spec.def $(DLLTOOL) -k -l $@ -d dsound/dsound.spec.def
libdswave.def: dswave/dswave.spec.def
$(RM) $@ && $(LN_S) dswave/dswave.spec.def $@
libdswave.a: dswave/dswave.spec.def
$(DLLTOOL) -k -l $@ -d dswave/dswave.spec.def
libgdi32.def: gdi/gdi32.spec.def libgdi32.def: gdi/gdi32.spec.def
$(RM) $@ && $(LN_S) gdi/gdi32.spec.def $@ $(RM) $@ && $(LN_S) gdi/gdi32.spec.def $@
libgdi32.a: gdi/gdi32.spec.def libgdi32.a: gdi/gdi32.spec.def
...@@ -1495,6 +1506,7 @@ dplay/dplay.spec.def: $(WINEBUILD) ...@@ -1495,6 +1506,7 @@ dplay/dplay.spec.def: $(WINEBUILD)
dplayx/dplayx.spec.def: $(WINEBUILD) dplayx/dplayx.spec.def: $(WINEBUILD)
dpnhpast/dpnhpast.spec.def: $(WINEBUILD) dpnhpast/dpnhpast.spec.def: $(WINEBUILD)
dsound/dsound.spec.def: $(WINEBUILD) dsound/dsound.spec.def: $(WINEBUILD)
dswave/dswave.spec.def: $(WINEBUILD)
gdi/gdi32.spec.def: $(WINEBUILD) gdi/gdi32.spec.def: $(WINEBUILD)
glu32/glu32.spec.def: $(WINEBUILD) glu32/glu32.spec.def: $(WINEBUILD)
glut32/glut32.spec.def: $(WINEBUILD) glut32/glut32.spec.def: $(WINEBUILD)
...@@ -1611,6 +1623,7 @@ dplay/dplay.dll$(DLLEXT): dplay ...@@ -1611,6 +1623,7 @@ dplay/dplay.dll$(DLLEXT): dplay
dplayx/dplayx.dll$(DLLEXT): dplayx dplayx/dplayx.dll$(DLLEXT): dplayx
dpnhpast/dpnhpast.dll$(DLLEXT): dpnhpast dpnhpast/dpnhpast.dll$(DLLEXT): dpnhpast
dsound/dsound.dll$(DLLEXT): dsound dsound/dsound.dll$(DLLEXT): dsound
dswave/dswave.dll$(DLLEXT): dswave
gdi/gdi32.dll$(DLLEXT): gdi gdi/gdi32.dll$(DLLEXT): gdi
glu32/glu32.dll$(DLLEXT): glu32 glu32/glu32.dll$(DLLEXT): glu32
glut32/glut32.dll$(DLLEXT): glut32 glut32/glut32.dll$(DLLEXT): glut32
......
/* DirectMusicBand Main /* DirectMusicBand Main
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dmband); WINE_DEFAULT_DEBUG_CHANNEL(dmband);
typedef struct typedef struct {
{
/* IUnknown fields */ /* IUnknown fields */
ICOM_VFIELD(IClassFactory); ICOM_VFIELD(IClassFactory);
DWORD ref; DWORD ref;
...@@ -32,44 +31,31 @@ typedef struct ...@@ -32,44 +31,31 @@ typedef struct
* DirectMusicBand ClassFactory * DirectMusicBand ClassFactory
*/ */
static HRESULT WINAPI BandCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) static HRESULT WINAPI BandCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI BandCF_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI BandCF_AddRef(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI BandCF_Release(LPCLASSFACTORY iface) static ULONG WINAPI BandCF_Release(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */ /* static class, won't be freed */
return --(This->ref); return --(This->ref);
} }
static HRESULT WINAPI BandCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) static HRESULT WINAPI BandCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj); TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicBand)) { return DMUSIC_CreateDirectMusicBandImpl (riid, ppobj, pOuter);
return DMUSIC_CreateDirectMusicBand (riid, (LPDIRECTMUSICBAND*) ppobj, pOuter);
} else if (IsEqualIID (riid, &IID_IDirectMusicObject)) {
return DMUSIC_CreateDirectMusicBandObject (riid, (LPDIRECTMUSICOBJECT*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
} }
static HRESULT WINAPI BandCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) static HRESULT WINAPI BandCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock); FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK; return S_OK;
...@@ -91,43 +77,31 @@ static IClassFactoryImpl Band_CF = {&BandCF_Vtbl, 1 }; ...@@ -91,43 +77,31 @@ static IClassFactoryImpl Band_CF = {&BandCF_Vtbl, 1 };
* DirectMusicBandTrack ClassFactory * DirectMusicBandTrack ClassFactory
*/ */
static HRESULT WINAPI BandTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) static HRESULT WINAPI BandTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI BandTrackCF_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI BandTrackCF_AddRef(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI BandTrackCF_Release(LPCLASSFACTORY iface) static ULONG WINAPI BandTrackCF_Release(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */ /* static class, won't be freed */
return --(This->ref); return --(This->ref);
} }
static HRESULT WINAPI BandTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) static HRESULT WINAPI BandTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj); TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicTrack) return DMUSIC_CreateDirectMusicBandTrack (riid, ppobj, pOuter);
|| IsEqualIID (riid, &IID_IDirectMusicTrack8)) {
return DMUSIC_CreateDirectMusicBandTrack (riid, (LPDIRECTMUSICTRACK8*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
} }
static HRESULT WINAPI BandTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) static HRESULT WINAPI BandTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock); FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK; return S_OK;
...@@ -149,15 +123,11 @@ static IClassFactoryImpl BandTrack_CF = {&BandTrackCF_Vtbl, 1 }; ...@@ -149,15 +123,11 @@ static IClassFactoryImpl BandTrack_CF = {&BandTrackCF_Vtbl, 1 };
* *
* *
*/ */
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
{ if (fdwReason == DLL_PROCESS_ATTACH) {
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL); DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */ /* FIXME: Initialisation */
} } else if (fdwReason == DLL_PROCESS_DETACH) {
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */ /* FIXME: Cleanup */
} }
...@@ -170,10 +140,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -170,10 +140,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
* *
* *
*/ */
HRESULT WINAPI DMBAND_DllCanUnloadNow(void) HRESULT WINAPI DMBAND_DllCanUnloadNow(void) {
{
FIXME("(void): stub\n"); FIXME("(void): stub\n");
return S_FALSE; return S_FALSE;
} }
...@@ -183,8 +151,7 @@ HRESULT WINAPI DMBAND_DllCanUnloadNow(void) ...@@ -183,8 +151,7 @@ HRESULT WINAPI DMBAND_DllCanUnloadNow(void)
* *
* *
*/ */
HRESULT WINAPI DMBAND_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) HRESULT WINAPI DMBAND_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusicBand) && IsEqualIID (riid, &IID_IClassFactory)) { if (IsEqualCLSID (rclsid, &CLSID_DirectMusicBand) && IsEqualIID (riid, &IID_IClassFactory)) {
......
...@@ -18,21 +18,7 @@ ...@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include "dmband_private.h"
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmband); WINE_DEFAULT_DEBUG_CHANNEL(dmband);
...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmband); ...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmband);
/*********************************************************************** /***********************************************************************
* interface for self-registering * interface for self-registering
*/ */
struct regsvr_interface struct regsvr_interface {
{
IID const *iid; /* NULL for end of list */ IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */ IID const *base_iid; /* can be NULL to omit */
...@@ -57,8 +42,7 @@ struct regsvr_interface ...@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list); static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list); static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass struct regsvr_coclass {
{
CLSID const *clsid; /* NULL for end of list */ CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */ LPCSTR ips; /* can be NULL to omit */
...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); ...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/*********************************************************************** /***********************************************************************
* register_interfaces * register_interfaces
*/ */
static HRESULT register_interfaces(struct regsvr_interface const *list) static HRESULT register_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -194,8 +177,7 @@ error_return: ...@@ -194,8 +177,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_interfaces * unregister_interfaces
*/ */
static HRESULT unregister_interfaces(struct regsvr_interface const *list) static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -219,8 +201,7 @@ error_return: ...@@ -219,8 +201,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* register_coclasses * register_coclasses
*/ */
static HRESULT register_coclasses(struct regsvr_coclass const *list) static HRESULT register_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -301,8 +282,7 @@ error_return: ...@@ -301,8 +282,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_coclasses * unregister_coclasses
*/ */
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -338,8 +318,7 @@ error_return: ...@@ -338,8 +318,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* regsvr_key_guid * regsvr_key_guid
*/ */
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
{
WCHAR buf[39]; WCHAR buf[39];
StringFromGUID2(guid, buf, 39); StringFromGUID2(guid, buf, 39);
...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) ...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW( static LONG register_key_defvalueW(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
WCHAR const *value) WCHAR const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW( ...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA( static LONG register_key_defvalueA(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
char const *value) char const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -394,8 +371,7 @@ static LONG register_progid( ...@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid, char const *progid,
char const *curver_progid, char const *curver_progid,
char const *name, char const *name,
char const *extra) char const *extra) {
{
LONG res; LONG res;
HKEY progid_key; HKEY progid_key;
...@@ -439,8 +415,7 @@ error_close_progid_key: ...@@ -439,8 +415,7 @@ error_close_progid_key:
/*********************************************************************** /***********************************************************************
* recursive_delete_key * recursive_delete_key
*/ */
static LONG recursive_delete_key(HKEY key) static LONG recursive_delete_key(HKEY key) {
{
LONG res; LONG res;
WCHAR subkey_name[MAX_PATH]; WCHAR subkey_name[MAX_PATH];
DWORD cName; DWORD cName;
...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key) ...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyA * recursive_delete_keyA
*/ */
static LONG recursive_delete_keyA(HKEY base, char const *name) static LONG recursive_delete_keyA(HKEY base, char const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name) ...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyW * recursive_delete_keyW
*/ */
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = { ...@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = {
/*********************************************************************** /***********************************************************************
* DllRegisterServer (DMBAND.3) * DllRegisterServer (DMBAND.3)
*/ */
HRESULT WINAPI DMBAND_DllRegisterServer(void) HRESULT WINAPI DMBAND_DllRegisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
...@@ -549,8 +521,7 @@ HRESULT WINAPI DMBAND_DllRegisterServer(void) ...@@ -549,8 +521,7 @@ HRESULT WINAPI DMBAND_DllRegisterServer(void)
/*********************************************************************** /***********************************************************************
* DllUnregisterServer (DMBAND.4) * DllUnregisterServer (DMBAND.4)
*/ */
HRESULT WINAPI DMBAND_DllUnregisterServer(void) HRESULT WINAPI DMBAND_DllUnregisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
......
/* /*
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Band" #define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Band"
#define WINE_FILENAME_STR "dmband.dll" #define WINE_FILENAME_STR "dmband.dll"
#define WINE_FILEVERSION 4,8,1,881 #define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.8.1.881" #define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,8,1,881 #define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.8" #define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX" #define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
/* IDirectMusicComposer /* IDirectMusicComposer
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,21 +17,12 @@ ...@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmcompos_private.h" #include "dmcompos_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmcompos); WINE_DEFAULT_DEBUG_CHANNEL(dmcompos);
/* IDirectMusicComposer IUnknown parts follow: */ /* IDirectMusicComposerImpl IUnknown part: */
HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusicComposerImpl,iface); ICOM_THIS(IDirectMusicComposerImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || if (IsEqualIID (riid, &IID_IUnknown) ||
...@@ -44,15 +35,13 @@ HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER if ...@@ -44,15 +35,13 @@ HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER if
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface) ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface) {
{
ICOM_THIS(IDirectMusicComposerImpl,iface); ICOM_THIS(IDirectMusicComposerImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface) ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface) {
{
ICOM_THIS(IDirectMusicComposerImpl,iface); ICOM_THIS(IDirectMusicComposerImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -62,63 +51,44 @@ ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface) ...@@ -62,63 +51,44 @@ ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface)
return ref; return ref;
} }
/* IDirectMusicComposer Interface follow: */ /* IDirectMusicComposerImpl IDirectMusicComposer part: */
HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromTemplate (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, IDirectMusicSegment* pTemplate, WORD wActivity, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment) HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromTemplate (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, IDirectMusicSegment* pTemplate, WORD wActivity, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment) {
{
ICOM_THIS(IDirectMusicComposerImpl,iface); ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %p, %d, %p, %p): stub\n", This, pStyle, pTemplate, wActivity, pChordMap, ppSegment); FIXME("(%p, %p, %p, %d, %p, %p): stub\n", This, pStyle, pTemplate, wActivity, pChordMap, ppSegment);
return S_OK; 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) 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); 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); FIXME("(%p, %p, %d, %d, %d, %d, %d, %p, %p): stub\n", This, pStyle, wNumMeasures, wShape, wActivity, fIntro, fEnd, pChordMap, ppSegment);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicComposerImpl_ComposeTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pFromSeg, IDirectMusicSegment* pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg) 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); ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %p, %ld, %d, %ld, %p, %p): stub\n", This, pFromSeg, pToSeg, mtTime, wCommand, dwFlags, pChordMap, ppTransSeg); FIXME("(%p, %p, %p, %ld, %d, %ld, %p, %p): stub\n", This, pFromSeg, pToSeg, mtTime, wCommand, dwFlags, pChordMap, ppTransSeg);
return S_OK; 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) 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); ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %d, %ld, %p, %p, %p, %p): stub\n", This, pPerformance, wCommand, dwFlags, pChordMap, ppTransSeg, ppToSegState, ppTransSegState); FIXME("(%p, %p, %d, %ld, %p, %p, %p, %p): stub\n", This, pPerformance, wCommand, dwFlags, pChordMap, ppTransSeg, ppToSegState, ppTransSegState);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicComposerImpl_ComposeTemplateFromShape (LPDIRECTMUSICCOMPOSER iface, WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment** ppTemplate) HRESULT WINAPI IDirectMusicComposerImpl_ComposeTemplateFromShape (LPDIRECTMUSICCOMPOSER iface, WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment** ppTemplate) {
{
ICOM_THIS(IDirectMusicComposerImpl,iface); ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %d, %d, %d, %d, %d, %p): stub\n", This, wNumMeasures, wShape, fIntro, fEnd, wEndLength, ppTemplate); FIXME("(%p, %d, %d, %d, %d, %d, %p): stub\n", This, wNumMeasures, wShape, fIntro, fEnd, wEndLength, ppTemplate);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicComposerImpl_ChangeChordMap (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pSegment, BOOL fTrackScale, IDirectMusicChordMap* pChordMap) HRESULT WINAPI IDirectMusicComposerImpl_ChangeChordMap (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pSegment, BOOL fTrackScale, IDirectMusicChordMap* pChordMap) {
{
ICOM_THIS(IDirectMusicComposerImpl,iface); ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %d, %p): stub\n", This, pSegment, fTrackScale, pChordMap); FIXME("(%p, %p, %d, %p): stub\n", This, pSegment, fTrackScale, pChordMap);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl = ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicComposerImpl_QueryInterface, IDirectMusicComposerImpl_QueryInterface,
IDirectMusicComposerImpl_AddRef, IDirectMusicComposerImpl_AddRef,
...@@ -132,22 +102,16 @@ ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl = ...@@ -132,22 +102,16 @@ ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl =
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicComposer (LPCGUID lpcGUID, LPDIRECTMUSICCOMPOSER* ppDMCP, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateDirectMusicComposerImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
{ IDirectMusicComposerImpl* obj;
IDirectMusicComposerImpl* dmcompos;
if (IsEqualIID (lpcGUID, &IID_IDirectMusicComposer)) { obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl));
dmcompos = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl)); if (NULL == obj) {
if (NULL == dmcompos) { *ppobj = (LPDIRECTMUSICCOMPOSER) NULL;
*ppDMCP = (LPDIRECTMUSICCOMPOSER) NULL; return E_OUTOFMEMORY;
return E_OUTOFMEMORY;
}
dmcompos->lpVtbl = &DirectMusicComposer_Vtbl;
dmcompos->ref = 1;
*ppDMCP = (LPDIRECTMUSICCOMPOSER) dmcompos;
return S_OK;
} }
WARN("No interface found\n"); obj->lpVtbl = &DirectMusicComposer_Vtbl;
obj->ref = 0; /* will be inited by QueryInterface */
return E_NOINTERFACE; return IDirectMusicComposerImpl_QueryInterface ((LPDIRECTMUSICCOMPOSER)obj, lpcGUID, ppobj);
} }
...@@ -18,21 +18,7 @@ ...@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include "dmcompos_private.h"
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmcompos); WINE_DEFAULT_DEBUG_CHANNEL(dmcompos);
...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmcompos); ...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmcompos);
/*********************************************************************** /***********************************************************************
* interface for self-registering * interface for self-registering
*/ */
struct regsvr_interface struct regsvr_interface {
{
IID const *iid; /* NULL for end of list */ IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */ IID const *base_iid; /* can be NULL to omit */
...@@ -57,8 +42,7 @@ struct regsvr_interface ...@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list); static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list); static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass struct regsvr_coclass {
{
CLSID const *clsid; /* NULL for end of list */ CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */ LPCSTR ips; /* can be NULL to omit */
...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); ...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/*********************************************************************** /***********************************************************************
* register_interfaces * register_interfaces
*/ */
static HRESULT register_interfaces(struct regsvr_interface const *list) static HRESULT register_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -194,8 +177,7 @@ error_return: ...@@ -194,8 +177,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_interfaces * unregister_interfaces
*/ */
static HRESULT unregister_interfaces(struct regsvr_interface const *list) static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -219,8 +201,7 @@ error_return: ...@@ -219,8 +201,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* register_coclasses * register_coclasses
*/ */
static HRESULT register_coclasses(struct regsvr_coclass const *list) static HRESULT register_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -301,8 +282,7 @@ error_return: ...@@ -301,8 +282,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_coclasses * unregister_coclasses
*/ */
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -338,8 +318,7 @@ error_return: ...@@ -338,8 +318,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* regsvr_key_guid * regsvr_key_guid
*/ */
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
{
WCHAR buf[39]; WCHAR buf[39];
StringFromGUID2(guid, buf, 39); StringFromGUID2(guid, buf, 39);
...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) ...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW( static LONG register_key_defvalueW(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
WCHAR const *value) WCHAR const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW( ...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA( static LONG register_key_defvalueA(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
char const *value) char const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -394,8 +371,7 @@ static LONG register_progid( ...@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid, char const *progid,
char const *curver_progid, char const *curver_progid,
char const *name, char const *name,
char const *extra) char const *extra) {
{
LONG res; LONG res;
HKEY progid_key; HKEY progid_key;
...@@ -439,8 +415,7 @@ error_close_progid_key: ...@@ -439,8 +415,7 @@ error_close_progid_key:
/*********************************************************************** /***********************************************************************
* recursive_delete_key * recursive_delete_key
*/ */
static LONG recursive_delete_key(HKEY key) static LONG recursive_delete_key(HKEY key) {
{
LONG res; LONG res;
WCHAR subkey_name[MAX_PATH]; WCHAR subkey_name[MAX_PATH];
DWORD cName; DWORD cName;
...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key) ...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyA * recursive_delete_keyA
*/ */
static LONG recursive_delete_keyA(HKEY base, char const *name) static LONG recursive_delete_keyA(HKEY base, char const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name) ...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyW * recursive_delete_keyW
*/ */
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -558,8 +531,7 @@ static struct regsvr_interface const interface_list[] = { ...@@ -558,8 +531,7 @@ static struct regsvr_interface const interface_list[] = {
/*********************************************************************** /***********************************************************************
* DllRegisterServer (DMCOMPOS.3) * DllRegisterServer (DMCOMPOS.3)
*/ */
HRESULT WINAPI DMCOMPOS_DllRegisterServer(void) HRESULT WINAPI DMCOMPOS_DllRegisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
...@@ -573,8 +545,7 @@ HRESULT WINAPI DMCOMPOS_DllRegisterServer(void) ...@@ -573,8 +545,7 @@ HRESULT WINAPI DMCOMPOS_DllRegisterServer(void)
/*********************************************************************** /***********************************************************************
* DllUnregisterServer (DMCOMPOS.4) * DllUnregisterServer (DMCOMPOS.4)
*/ */
HRESULT WINAPI DMCOMPOS_DllUnregisterServer(void) HRESULT WINAPI DMCOMPOS_DllUnregisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
......
/* /*
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Composer" #define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Composer"
#define WINE_FILENAME_STR "dmcompos.dll" #define WINE_FILENAME_STR "dmcompos.dll"
#define WINE_FILEVERSION 4,8,1,881 #define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.8.1.881" #define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,8,1,881 #define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.8" #define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX" #define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
...@@ -20,7 +20,6 @@ C_SRCS = \ ...@@ -20,7 +20,6 @@ C_SRCS = \
segmentstate.c \ segmentstate.c \
segtriggertrack.c \ segtriggertrack.c \
seqtrack.c \ seqtrack.c \
song.c \
sysextrack.c \ sysextrack.c \
tempotrack.c \ tempotrack.c \
timesigtrack.c \ timesigtrack.c \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/* IDirectMusicPatternTrack Implementation /* IDirectMusicPatternTrack Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,21 +17,12 @@ ...@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h" #include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmime); WINE_DEFAULT_DEBUG_CHANNEL(dmime);
/* IDirectMusicPatternTrack IUnknown parts follow: */ /* IDirectMusicPatternTrack IUnknown parts follow: */
HRESULT WINAPI IDirectMusicPatternTrackImpl_QueryInterface (LPDIRECTMUSICPATTERNTRACK iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicPatternTrackImpl_QueryInterface (LPDIRECTMUSICPATTERNTRACK iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface); ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || if (IsEqualIID (riid, &IID_IUnknown) ||
...@@ -45,15 +36,13 @@ HRESULT WINAPI IDirectMusicPatternTrackImpl_QueryInterface (LPDIRECTMUSICPATTERN ...@@ -45,15 +36,13 @@ HRESULT WINAPI IDirectMusicPatternTrackImpl_QueryInterface (LPDIRECTMUSICPATTERN
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicPatternTrackImpl_AddRef (LPDIRECTMUSICPATTERNTRACK iface) ULONG WINAPI IDirectMusicPatternTrackImpl_AddRef (LPDIRECTMUSICPATTERNTRACK iface) {
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface); ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK iface) ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK iface) {
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface); ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -64,35 +53,25 @@ ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK ifa ...@@ -64,35 +53,25 @@ ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK ifa
} }
/* IDirectMusicPatternTrack Interface follow: */ /* IDirectMusicPatternTrack Interface follow: */
HRESULT WINAPI IDirectMusicPatternTrackImpl_CreateSegment (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicStyle* pStyle, IDirectMusicSegment** ppSegment) HRESULT WINAPI IDirectMusicPatternTrackImpl_CreateSegment (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicStyle* pStyle, IDirectMusicSegment** ppSegment) {
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface); ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pStyle, ppSegment); FIXME("(%p, %p, %p): stub\n", This, pStyle, ppSegment);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetVariation (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, DWORD dwVariationFlags, DWORD dwPart) HRESULT WINAPI IDirectMusicPatternTrackImpl_SetVariation (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, DWORD dwVariationFlags, DWORD dwPart) {
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface); ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %ld, %ld): stub\n", This, pSegState, dwVariationFlags, dwPart); FIXME("(%p, %p, %ld, %ld): stub\n", This, pSegState, dwVariationFlags, dwPart);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetPatternByName (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, WCHAR* wszName, IDirectMusicStyle* pStyle, DWORD dwPatternType, DWORD* pdwLength) HRESULT WINAPI IDirectMusicPatternTrackImpl_SetPatternByName (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, WCHAR* wszName, IDirectMusicStyle* pStyle, DWORD dwPatternType, DWORD* pdwLength) {
{
ICOM_THIS(IDirectMusicPatternTrackImpl,iface); ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %p, %p, %ld, %p): stub\n", This, pSegState, wszName, pStyle, dwPatternType, pdwLength); FIXME("(%p, %p, %p, %p, %ld, %p): stub\n", This, pSegState, wszName, pStyle, dwPatternType, pdwLength);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusicPatternTrack) DirectMusicPatternTrack_Vtbl = ICOM_VTABLE(IDirectMusicPatternTrack) DirectMusicPatternTrack_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicPatternTrackImpl_QueryInterface, IDirectMusicPatternTrackImpl_QueryInterface,
IDirectMusicPatternTrackImpl_AddRef, IDirectMusicPatternTrackImpl_AddRef,
...@@ -103,14 +82,16 @@ ICOM_VTABLE(IDirectMusicPatternTrack) DirectMusicPatternTrack_Vtbl = ...@@ -103,14 +82,16 @@ ICOM_VTABLE(IDirectMusicPatternTrack) DirectMusicPatternTrack_Vtbl =
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrack (LPCGUID lpcGUID, LPDIRECTMUSICPATTERNTRACK *ppDMPtrnTrack, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrackImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
{ IDirectMusicPatternTrackImpl* track;
if (IsEqualIID (lpcGUID, &IID_IDirectMusicComposer))
{ track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPatternTrackImpl));
FIXME("Not yet\n"); if (NULL == track) {
return E_NOINTERFACE; *ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
} }
track->lpVtbl = &DirectMusicPatternTrack_Vtbl;
track->ref = 0; /* will be inited by QueryInterface */
WARN("No interface found\n"); return IDirectMusicPatternTrackImpl_QueryInterface ((LPDIRECTMUSICPATTERNTRACK)track, lpcGUID, ppobj);
return E_NOINTERFACE;
} }
...@@ -18,21 +18,7 @@ ...@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include "dmime_private.h"
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmime); WINE_DEFAULT_DEBUG_CHANNEL(dmime);
...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmime); ...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmime);
/*********************************************************************** /***********************************************************************
* interface for self-registering * interface for self-registering
*/ */
struct regsvr_interface struct regsvr_interface {
{
IID const *iid; /* NULL for end of list */ IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */ IID const *base_iid; /* can be NULL to omit */
...@@ -57,8 +42,7 @@ struct regsvr_interface ...@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list); static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list); static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass struct regsvr_coclass {
{
CLSID const *clsid; /* NULL for end of list */ CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */ LPCSTR ips; /* can be NULL to omit */
...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); ...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/*********************************************************************** /***********************************************************************
* register_interfaces * register_interfaces
*/ */
static HRESULT register_interfaces(struct regsvr_interface const *list) static HRESULT register_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -194,8 +177,7 @@ error_return: ...@@ -194,8 +177,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_interfaces * unregister_interfaces
*/ */
static HRESULT unregister_interfaces(struct regsvr_interface const *list) static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -219,8 +201,7 @@ error_return: ...@@ -219,8 +201,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* register_coclasses * register_coclasses
*/ */
static HRESULT register_coclasses(struct regsvr_coclass const *list) static HRESULT register_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -301,8 +282,7 @@ error_return: ...@@ -301,8 +282,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_coclasses * unregister_coclasses
*/ */
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -338,8 +318,7 @@ error_return: ...@@ -338,8 +318,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* regsvr_key_guid * regsvr_key_guid
*/ */
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
{
WCHAR buf[39]; WCHAR buf[39];
StringFromGUID2(guid, buf, 39); StringFromGUID2(guid, buf, 39);
...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) ...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW( static LONG register_key_defvalueW(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
WCHAR const *value) WCHAR const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW( ...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA( static LONG register_key_defvalueA(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
char const *value) char const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -394,8 +371,7 @@ static LONG register_progid( ...@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid, char const *progid,
char const *curver_progid, char const *curver_progid,
char const *name, char const *name,
char const *extra) char const *extra) {
{
LONG res; LONG res;
HKEY progid_key; HKEY progid_key;
...@@ -439,8 +415,7 @@ error_close_progid_key: ...@@ -439,8 +415,7 @@ error_close_progid_key:
/*********************************************************************** /***********************************************************************
* recursive_delete_key * recursive_delete_key
*/ */
static LONG recursive_delete_key(HKEY key) static LONG recursive_delete_key(HKEY key) {
{
LONG res; LONG res;
WCHAR subkey_name[MAX_PATH]; WCHAR subkey_name[MAX_PATH];
DWORD cName; DWORD cName;
...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key) ...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyA * recursive_delete_keyA
*/ */
static LONG recursive_delete_keyA(HKEY base, char const *name) static LONG recursive_delete_keyA(HKEY base, char const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name) ...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyW * recursive_delete_keyW
*/ */
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -592,14 +565,6 @@ static struct regsvr_coclass const coclass_list[] = { ...@@ -592,14 +565,6 @@ static struct regsvr_coclass const coclass_list[] = {
"Microsoft.DirectMusicLyricsTrack.1", "Microsoft.DirectMusicLyricsTrack.1",
"Microsoft.DirectMusicLyricsTrack" "Microsoft.DirectMusicLyricsTrack"
}, },
{ &CLSID_DirectMusicSong,
"DirectMusicSong",
NULL,
"dmime.dll",
"Both",
"Microsoft.DirectMusicSong.1",
"Microsoft.DirectMusicSong"
},
{ &CLSID_DirectMusicSegTriggerTrack, { &CLSID_DirectMusicSegTriggerTrack,
"DirectMusicSegTriggerTrack", "DirectMusicSegTriggerTrack",
NULL, NULL,
...@@ -638,8 +603,7 @@ static struct regsvr_interface const interface_list[] = { ...@@ -638,8 +603,7 @@ static struct regsvr_interface const interface_list[] = {
/*********************************************************************** /***********************************************************************
* DllRegisterServer (DMIME.3) * DllRegisterServer (DMIME.3)
*/ */
HRESULT WINAPI DMIME_DllRegisterServer(void) HRESULT WINAPI DMIME_DllRegisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
...@@ -653,8 +617,7 @@ HRESULT WINAPI DMIME_DllRegisterServer(void) ...@@ -653,8 +617,7 @@ HRESULT WINAPI DMIME_DllRegisterServer(void)
/*********************************************************************** /***********************************************************************
* DllUnregisterServer (DMIME.4) * DllUnregisterServer (DMIME.4)
*/ */
HRESULT WINAPI DMIME_DllUnregisterServer(void) HRESULT WINAPI DMIME_DllUnregisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
......
/* IDirectMusicSegmentState8 Implementation /* IDirectMusicSegmentState8 Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,22 +17,12 @@ ...@@ -17,22 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h" #include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmime); WINE_DEFAULT_DEBUG_CHANNEL(dmime);
/* IDirectMusicSegmentState8Impl IUnknown part: */
/* IDirectMusicSegmentState8 IUnknown part: */ HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface, REFIID riid, LPVOID *ppobj) {
HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
if (IsEqualIID(riid, &IID_IUnknown) || if (IsEqualIID(riid, &IID_IUnknown) ||
...@@ -46,15 +36,13 @@ HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMEN ...@@ -46,15 +36,13 @@ HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMEN
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface) ULONG WINAPI IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface) {
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface) ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface) {
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -64,73 +52,51 @@ ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 i ...@@ -64,73 +52,51 @@ ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 i
return ref; return ref;
} }
/* IDirectMusicSegmentState8 IDirectMusicSegmentState part: */ /* IDirectMusicSegmentState8Impl IDirectMusicSegmentState part: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD* pdwRepeats) HRESULT WINAPI IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD* pdwRepeats) {
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwRepeats); FIXME("(%p, %p): stub\n", This, pdwRepeats);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface, IDirectMusicSegment** ppSegment) HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface, IDirectMusicSegment** ppSegment) {
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, ppSegment); FIXME("(%p, %p): stub\n", This, ppSegment);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart) HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart) {
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtStart); FIXME("(%p, %p): stub\n", This, pmtStart);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtSeek) HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtSeek) {
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtSeek); FIXME("(%p, %p): stub\n", This, pmtSeek);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart) HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart) {
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtStart); FIXME("(%p, %p): stub\n", This, pmtStart);
return S_OK; return S_OK;
} }
/* IDirectMusicSegmentState8 IDirectMusicSegmentState8 part: */ /* IDirectMusicSegmentState8Impl IDirectMusicSegmentState8 part: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff) HRESULT WINAPI IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff) {
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This, debugstr_guid(rguidTrackClassID), dwGroupBits, dwIndex, dwFlagsOn, dwFlagsOff); FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This, debugstr_guid(rguidTrackClassID), dwGroupBits, dwIndex, dwFlagsOn, dwFlagsOff);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void** ppObject) HRESULT WINAPI IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void** ppObject) {
{
ICOM_THIS(IDirectMusicSegmentState8Impl,iface); 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); 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; return S_OK;
} }
ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl = ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicSegmentState8Impl_QueryInterface, IDirectMusicSegmentState8Impl_QueryInterface,
IDirectMusicSegmentState8Impl_AddRef, IDirectMusicSegmentState8Impl_AddRef,
...@@ -145,14 +111,16 @@ ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl = ...@@ -145,14 +111,16 @@ ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl =
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentState (LPCGUID lpcGUID, LPDIRECTMUSICSEGMENTSTATE8 *ppDMSeg, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
{ IDirectMusicSegmentState8Impl* obj;
if (IsEqualIID (lpcGUID, &IID_IDirectMusicSegmentState)
|| IsEqualIID (lpcGUID, &IID_IDirectMusicSegmentState8)) { obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegmentState8Impl));
FIXME("Not yet\n"); if (NULL == obj) {
return E_NOINTERFACE; *ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
} }
WARN("No interface found\n"); obj->lpVtbl = &DirectMusicSegmentState8_Vtbl;
obj->ref = 0; /* will be inited by QueryInterface */
return E_NOINTERFACE; return IDirectMusicSegmentState8Impl_QueryInterface ((LPDIRECTMUSICSEGMENTSTATE8)obj, lpcGUID, ppobj);
} }
/* IDirectMusicTool8 Implementation /* IDirectMusicTool8 Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,24 +17,13 @@ ...@@ -17,24 +17,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h" #include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmime); WINE_DEFAULT_DEBUG_CHANNEL(dmime);
/* IDirectMusicTool8Impl IUnknown part: */
/* IDirectMusicTool8 IUnknown part: */ HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, REFIID riid, LPVOID *ppobj) {
HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IDirectMusicTool) || IsEqualIID (riid, &IID_IDirectMusicTool) ||
IsEqualIID (riid, &IID_IDirectMusicTool8)) { IsEqualIID (riid, &IID_IDirectMusicTool8)) {
...@@ -46,15 +35,13 @@ HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, R ...@@ -46,15 +35,13 @@ HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, R
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface) ULONG WINAPI IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface) {
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface) ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface) {
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -64,73 +51,51 @@ ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface) ...@@ -64,73 +51,51 @@ ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface)
return ref; return ref;
} }
/* IDirectMusicTool8 IDirectMusicTool part: */ /* IDirectMusicTool8Impl IDirectMusicTool part: */
HRESULT WINAPI IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface, IDirectMusicGraph* pGraph) HRESULT WINAPI IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface, IDirectMusicGraph* pGraph) {
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pGraph); FIXME("(%p, %p): stub\n", This, pGraph);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface, DWORD* pdwDeliveryType) HRESULT WINAPI IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface, DWORD* pdwDeliveryType) {
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwDeliveryType); FIXME("(%p, %p): stub\n", This, pdwDeliveryType);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface, DWORD* pdwNumElements) HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface, DWORD* pdwNumElements) {
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwNumElements); FIXME("(%p, %p): stub\n", This, pdwNumElements);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface, DWORD** padwMediaTypes, DWORD dwNumElements) HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface, DWORD** padwMediaTypes, DWORD dwNumElements) {
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %ld): stub\n", This, padwMediaTypes, dwNumElements); FIXME("(%p, %p, %ld): stub\n", This, padwMediaTypes, dwNumElements);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG) HRESULT WINAPI IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG) {
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %p): stub\n", This, pPerf, pPMSG); FIXME("(%p, %p, %p): stub\n", This, pPerf, pPMSG);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime) HRESULT WINAPI IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime) {
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %p, %lli): stub\n", This, pPerf, pPMSG, rtTime); FIXME("(%p, %p, %p, %lli): stub\n", This, pPerf, pPMSG, rtTime);
return S_OK; return S_OK;
} }
/* IDirectMusicTool8 IDirectMusicTool8 part: */ /* IDirectMusicTool8Impl IDirectMusicTool8 part: */
HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool) HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool) {
{
ICOM_THIS(IDirectMusicTool8Impl,iface); ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, ppTool); FIXME("(%p, %p): stub\n", This, ppTool);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl = ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicTool8Impl_QueryInterface, IDirectMusicTool8Impl_QueryInterface,
IDirectMusicTool8Impl_AddRef, IDirectMusicTool8Impl_AddRef,
...@@ -145,13 +110,16 @@ ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl = ...@@ -145,13 +110,16 @@ ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl =
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicTool (LPCGUID lpcGUID, LPDIRECTMUSICTOOL8 *ppDMTool, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateDirectMusicobjImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
{ IDirectMusicTool8Impl* obj;
if (IsEqualIID (lpcGUID, &IID_IDirectMusicComposer)) {
FIXME("Not yet\n"); obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTool8Impl));
return E_NOINTERFACE; if (NULL == obj) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
} }
WARN("No interface found\n"); obj->lpVtbl = &DirectMusicTool8_Vtbl;
obj->ref = 0; /* will be inited by QueryInterface */
return E_NOINTERFACE; return IDirectMusicTool8Impl_QueryInterface ((LPDIRECTMUSICTOOL8)obj, lpcGUID, ppobj);
} }
/* /*
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Interactive Engine" #define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Interactive Engine"
#define WINE_FILENAME_STR "dmime.dll" #define WINE_FILENAME_STR "dmime.dll"
#define WINE_FILEVERSION 4,8,1,881 #define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.8.1.881" #define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,8,1,881 #define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.8" #define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX" #define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
/* DirectMusicLoader Main /* DirectMusicLoader Main
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dmloader); WINE_DEFAULT_DEBUG_CHANNEL(dmloader);
typedef struct typedef struct {
{
/* IUnknown fields */ /* IUnknown fields */
ICOM_VFIELD(IClassFactory); ICOM_VFIELD(IClassFactory);
DWORD ref; DWORD ref;
...@@ -31,43 +30,30 @@ typedef struct ...@@ -31,43 +30,30 @@ typedef struct
/****************************************************************** /******************************************************************
* DirectMusicLoader ClassFactory * DirectMusicLoader ClassFactory
*/ */
static HRESULT WINAPI LoaderCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) static HRESULT WINAPI LoaderCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI LoaderCF_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI LoaderCF_AddRef(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI LoaderCF_Release(LPCLASSFACTORY iface) static ULONG WINAPI LoaderCF_Release(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */ /* static class, won't be freed */
return --(This->ref); return --(This->ref);
} }
static HRESULT WINAPI LoaderCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) static HRESULT WINAPI LoaderCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj); TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (&IID_IDirectMusicLoader, riid) || return DMUSIC_CreateDirectMusicLoaderImpl (riid, (LPVOID*) ppobj, pOuter);
IsEqualIID (&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 LoaderCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) static HRESULT WINAPI LoaderCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock); FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK; return S_OK;
...@@ -87,44 +73,30 @@ static IClassFactoryImpl Loader_CF = {&LoaderCF_Vtbl, 1 }; ...@@ -87,44 +73,30 @@ static IClassFactoryImpl Loader_CF = {&LoaderCF_Vtbl, 1 };
/****************************************************************** /******************************************************************
* DirectMusicContainer ClassFactory * DirectMusicContainer ClassFactory
*/ */
static HRESULT WINAPI ContainerCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) static HRESULT WINAPI ContainerCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI ContainerCF_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI ContainerCF_AddRef(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI ContainerCF_Release(LPCLASSFACTORY iface) static ULONG WINAPI ContainerCF_Release(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */ /* static class, won't be freed */
return --(This->ref); return --(This->ref);
} }
static HRESULT WINAPI ContainerCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) static HRESULT WINAPI ContainerCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj); TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicContainer)) { return DMUSIC_CreateDirectMusicContainerImpl (riid, (LPVOID*) ppobj, pOuter);
return DMUSIC_CreateDirectMusicContainer (riid, (LPDIRECTMUSICCONTAINER*) ppobj, pOuter);
} else if (IsEqualIID (riid, &IID_IDirectMusicObject)) {
return DMUSIC_CreateDirectMusicContainerObject (riid, (LPDIRECTMUSICOBJECT*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
} }
static HRESULT WINAPI ContainerCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) static HRESULT WINAPI ContainerCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock); FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK; return S_OK;
...@@ -146,18 +118,14 @@ static IClassFactoryImpl Container_CF = {&ContainerCF_Vtbl, 1 }; ...@@ -146,18 +118,14 @@ static IClassFactoryImpl Container_CF = {&ContainerCF_Vtbl, 1 };
* *
* *
*/ */
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
{ if (fdwReason == DLL_PROCESS_ATTACH) {
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL); DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */ /* FIXME: Initialisation */
} }
else if (fdwReason == DLL_PROCESS_DETACH) else if (fdwReason == DLL_PROCESS_DETACH) {
{
/* FIXME: Cleanup */ /* FIXME: Cleanup */
} }
return TRUE; return TRUE;
} }
...@@ -167,10 +135,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -167,10 +135,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
* *
* *
*/ */
HRESULT WINAPI DMLOADER_DllCanUnloadNow(void) HRESULT WINAPI DMLOADER_DllCanUnloadNow(void) {
{
FIXME("(void): stub\n"); FIXME("(void): stub\n");
return S_FALSE; return S_FALSE;
} }
...@@ -180,8 +146,7 @@ HRESULT WINAPI DMLOADER_DllCanUnloadNow(void) ...@@ -180,8 +146,7 @@ HRESULT WINAPI DMLOADER_DllCanUnloadNow(void)
* *
* *
*/ */
HRESULT WINAPI DMLOADER_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) HRESULT WINAPI DMLOADER_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusicLoader) && IsEqualIID (riid, &IID_IClassFactory)) { if (IsEqualCLSID (rclsid, &CLSID_DirectMusicLoader) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &Loader_CF; *ppv = (LPVOID) &Loader_CF;
......
...@@ -18,21 +18,7 @@ ...@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include "dmloader_private.h"
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmloader); WINE_DEFAULT_DEBUG_CHANNEL(dmloader);
...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmloader); ...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmloader);
/*********************************************************************** /***********************************************************************
* interface for self-registering * interface for self-registering
*/ */
struct regsvr_interface struct regsvr_interface {
{
IID const *iid; /* NULL for end of list */ IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */ IID const *base_iid; /* can be NULL to omit */
...@@ -57,8 +42,7 @@ struct regsvr_interface ...@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list); static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list); static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass struct regsvr_coclass {
{
CLSID const *clsid; /* NULL for end of list */ CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */ LPCSTR ips; /* can be NULL to omit */
...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); ...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/*********************************************************************** /***********************************************************************
* register_interfaces * register_interfaces
*/ */
static HRESULT register_interfaces(struct regsvr_interface const *list) static HRESULT register_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -194,8 +177,7 @@ error_return: ...@@ -194,8 +177,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_interfaces * unregister_interfaces
*/ */
static HRESULT unregister_interfaces(struct regsvr_interface const *list) static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -219,8 +201,7 @@ error_return: ...@@ -219,8 +201,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* register_coclasses * register_coclasses
*/ */
static HRESULT register_coclasses(struct regsvr_coclass const *list) static HRESULT register_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -301,8 +282,7 @@ error_return: ...@@ -301,8 +282,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_coclasses * unregister_coclasses
*/ */
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -338,8 +318,7 @@ error_return: ...@@ -338,8 +318,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* regsvr_key_guid * regsvr_key_guid
*/ */
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
{
WCHAR buf[39]; WCHAR buf[39];
StringFromGUID2(guid, buf, 39); StringFromGUID2(guid, buf, 39);
...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) ...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW( static LONG register_key_defvalueW(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
WCHAR const *value) WCHAR const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW( ...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA( static LONG register_key_defvalueA(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
char const *value) char const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -394,8 +371,7 @@ static LONG register_progid( ...@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid, char const *progid,
char const *curver_progid, char const *curver_progid,
char const *name, char const *name,
char const *extra) char const *extra) {
{
LONG res; LONG res;
HKEY progid_key; HKEY progid_key;
...@@ -439,8 +415,7 @@ error_close_progid_key: ...@@ -439,8 +415,7 @@ error_close_progid_key:
/*********************************************************************** /***********************************************************************
* recursive_delete_key * recursive_delete_key
*/ */
static LONG recursive_delete_key(HKEY key) static LONG recursive_delete_key(HKEY key) {
{
LONG res; LONG res;
WCHAR subkey_name[MAX_PATH]; WCHAR subkey_name[MAX_PATH];
DWORD cName; DWORD cName;
...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key) ...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyA * recursive_delete_keyA
*/ */
static LONG recursive_delete_keyA(HKEY base, char const *name) static LONG recursive_delete_keyA(HKEY base, char const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name) ...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyW * recursive_delete_keyW
*/ */
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = { ...@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = {
/*********************************************************************** /***********************************************************************
* DllRegisterServer (DMLOADER.3) * DllRegisterServer (DMLOADER.3)
*/ */
HRESULT WINAPI DMLOADER_DllRegisterServer(void) HRESULT WINAPI DMLOADER_DllRegisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
...@@ -549,8 +521,7 @@ HRESULT WINAPI DMLOADER_DllRegisterServer(void) ...@@ -549,8 +521,7 @@ HRESULT WINAPI DMLOADER_DllRegisterServer(void)
/*********************************************************************** /***********************************************************************
* DllUnregisterServer (DMLOADER.4) * DllUnregisterServer (DMLOADER.4)
*/ */
HRESULT WINAPI DMLOADER_DllUnregisterServer(void) HRESULT WINAPI DMLOADER_DllUnregisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
......
/* /*
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Loader" #define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Loader"
#define WINE_FILENAME_STR "dmloader.dll" #define WINE_FILENAME_STR "dmloader.dll"
#define WINE_FILEVERSION 4,8,1,881 #define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.8.1.881" #define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,8,1,881 #define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.8" #define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX" #define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
...@@ -18,21 +18,7 @@ ...@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include "dmscript_private.h"
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmscript); WINE_DEFAULT_DEBUG_CHANNEL(dmscript);
...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmscript); ...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmscript);
/*********************************************************************** /***********************************************************************
* interface for self-registering * interface for self-registering
*/ */
struct regsvr_interface struct regsvr_interface {
{
IID const *iid; /* NULL for end of list */ IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */ IID const *base_iid; /* can be NULL to omit */
...@@ -57,8 +42,7 @@ struct regsvr_interface ...@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list); static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list); static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass struct regsvr_coclass {
{
CLSID const *clsid; /* NULL for end of list */ CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */ LPCSTR ips; /* can be NULL to omit */
...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); ...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/*********************************************************************** /***********************************************************************
* register_interfaces * register_interfaces
*/ */
static HRESULT register_interfaces(struct regsvr_interface const *list) static HRESULT register_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -194,8 +177,7 @@ error_return: ...@@ -194,8 +177,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_interfaces * unregister_interfaces
*/ */
static HRESULT unregister_interfaces(struct regsvr_interface const *list) static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -219,8 +201,7 @@ error_return: ...@@ -219,8 +201,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* register_coclasses * register_coclasses
*/ */
static HRESULT register_coclasses(struct regsvr_coclass const *list) static HRESULT register_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -301,8 +282,7 @@ error_return: ...@@ -301,8 +282,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_coclasses * unregister_coclasses
*/ */
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -338,8 +318,7 @@ error_return: ...@@ -338,8 +318,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* regsvr_key_guid * regsvr_key_guid
*/ */
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
{
WCHAR buf[39]; WCHAR buf[39];
StringFromGUID2(guid, buf, 39); StringFromGUID2(guid, buf, 39);
...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) ...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW( static LONG register_key_defvalueW(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
WCHAR const *value) WCHAR const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW( ...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA( static LONG register_key_defvalueA(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
char const *value) char const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -394,8 +371,7 @@ static LONG register_progid( ...@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid, char const *progid,
char const *curver_progid, char const *curver_progid,
char const *name, char const *name,
char const *extra) char const *extra) {
{
LONG res; LONG res;
HKEY progid_key; HKEY progid_key;
...@@ -439,8 +415,7 @@ error_close_progid_key: ...@@ -439,8 +415,7 @@ error_close_progid_key:
/*********************************************************************** /***********************************************************************
* recursive_delete_key * recursive_delete_key
*/ */
static LONG recursive_delete_key(HKEY key) static LONG recursive_delete_key(HKEY key) {
{
LONG res; LONG res;
WCHAR subkey_name[MAX_PATH]; WCHAR subkey_name[MAX_PATH];
DWORD cName; DWORD cName;
...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key) ...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyA * recursive_delete_keyA
*/ */
static LONG recursive_delete_keyA(HKEY base, char const *name) static LONG recursive_delete_keyA(HKEY base, char const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name) ...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyW * recursive_delete_keyW
*/ */
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -599,8 +572,7 @@ static struct regsvr_interface const interface_list[] = { ...@@ -599,8 +572,7 @@ static struct regsvr_interface const interface_list[] = {
/*********************************************************************** /***********************************************************************
* DllRegisterServer (DMSCRIPT.3) * DllRegisterServer (DMSCRIPT.3)
*/ */
HRESULT WINAPI DMSCRIPT_DllRegisterServer(void) HRESULT WINAPI DMSCRIPT_DllRegisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
...@@ -614,8 +586,7 @@ HRESULT WINAPI DMSCRIPT_DllRegisterServer(void) ...@@ -614,8 +586,7 @@ HRESULT WINAPI DMSCRIPT_DllRegisterServer(void)
/*********************************************************************** /***********************************************************************
* DllUnregisterServer (DMSCRIPT.4) * DllUnregisterServer (DMSCRIPT.4)
*/ */
HRESULT WINAPI DMSCRIPT_DllUnregisterServer(void) HRESULT WINAPI DMSCRIPT_DllUnregisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
......
/* /*
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Scripting" #define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Scripting"
#define WINE_FILENAME_STR "dmscript.dll" #define WINE_FILENAME_STR "dmscript.dll"
#define WINE_FILEVERSION 4,8,1,881 #define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.8.1.881" #define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,8,1,881 #define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.8" #define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX" #define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
...@@ -11,7 +11,6 @@ C_SRCS = \ ...@@ -11,7 +11,6 @@ C_SRCS = \
chordtrack.c \ chordtrack.c \
commandtrack.c \ commandtrack.c \
dmstyle_main.c \ dmstyle_main.c \
melodyformulationtrack.c \
motiftrack.c \ motiftrack.c \
mutetrack.c \ mutetrack.c \
regsvr.c \ regsvr.c \
......
...@@ -18,21 +18,7 @@ ...@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include "dmstyle_private.h"
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmstyle); WINE_DEFAULT_DEBUG_CHANNEL(dmstyle);
...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmstyle); ...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmstyle);
/*********************************************************************** /***********************************************************************
* interface for self-registering * interface for self-registering
*/ */
struct regsvr_interface struct regsvr_interface {
{
IID const *iid; /* NULL for end of list */ IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */ IID const *base_iid; /* can be NULL to omit */
...@@ -57,8 +42,7 @@ struct regsvr_interface ...@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list); static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list); static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass struct regsvr_coclass {
{
CLSID const *clsid; /* NULL for end of list */ CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */ LPCSTR ips; /* can be NULL to omit */
...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); ...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/*********************************************************************** /***********************************************************************
* register_interfaces * register_interfaces
*/ */
static HRESULT register_interfaces(struct regsvr_interface const *list) static HRESULT register_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -194,8 +177,7 @@ error_return: ...@@ -194,8 +177,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_interfaces * unregister_interfaces
*/ */
static HRESULT unregister_interfaces(struct regsvr_interface const *list) static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -219,8 +201,7 @@ error_return: ...@@ -219,8 +201,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* register_coclasses * register_coclasses
*/ */
static HRESULT register_coclasses(struct regsvr_coclass const *list) static HRESULT register_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -301,8 +282,7 @@ error_return: ...@@ -301,8 +282,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_coclasses * unregister_coclasses
*/ */
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -338,8 +318,7 @@ error_return: ...@@ -338,8 +318,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* regsvr_key_guid * regsvr_key_guid
*/ */
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
{
WCHAR buf[39]; WCHAR buf[39];
StringFromGUID2(guid, buf, 39); StringFromGUID2(guid, buf, 39);
...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) ...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW( static LONG register_key_defvalueW(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
WCHAR const *value) WCHAR const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW( ...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA( static LONG register_key_defvalueA(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
char const *value) char const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -394,8 +371,7 @@ static LONG register_progid( ...@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid, char const *progid,
char const *curver_progid, char const *curver_progid,
char const *name, char const *name,
char const *extra) char const *extra) {
{
LONG res; LONG res;
HKEY progid_key; HKEY progid_key;
...@@ -439,8 +415,7 @@ error_close_progid_key: ...@@ -439,8 +415,7 @@ error_close_progid_key:
/*********************************************************************** /***********************************************************************
* recursive_delete_key * recursive_delete_key
*/ */
static LONG recursive_delete_key(HKEY key) static LONG recursive_delete_key(HKEY key) {
{
LONG res; LONG res;
WCHAR subkey_name[MAX_PATH]; WCHAR subkey_name[MAX_PATH];
DWORD cName; DWORD cName;
...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key) ...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyA * recursive_delete_keyA
*/ */
static LONG recursive_delete_keyA(HKEY base, char const *name) static LONG recursive_delete_keyA(HKEY base, char const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name) ...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyW * recursive_delete_keyW
*/ */
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -568,14 +541,6 @@ static struct regsvr_coclass const coclass_list[] = { ...@@ -568,14 +541,6 @@ static struct regsvr_coclass const coclass_list[] = {
"Microsoft.DirectMusicMuteTrack.1", "Microsoft.DirectMusicMuteTrack.1",
"Microsoft.DirectMusicMuteTrack" "Microsoft.DirectMusicMuteTrack"
}, },
{ &CLSID_DirectMusicMelodyFormulationTrack,
"DirectMusicMelodyFormulationTrack",
NULL,
"dmstyle.dll",
"Both",
"Microsoft.DirectMusicMelodyFormulationTrack.1",
"Microsoft.DirectMusicMelodyFormulationTrack"
},
{ NULL } /* list terminator */ { NULL } /* list terminator */
}; };
...@@ -590,8 +555,7 @@ static struct regsvr_interface const interface_list[] = { ...@@ -590,8 +555,7 @@ static struct regsvr_interface const interface_list[] = {
/*********************************************************************** /***********************************************************************
* DllRegisterServer (DMSTYLE.3) * DllRegisterServer (DMSTYLE.3)
*/ */
HRESULT WINAPI DMSTYLE_DllRegisterServer() HRESULT WINAPI DMSTYLE_DllRegisterServer() {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
...@@ -605,8 +569,7 @@ HRESULT WINAPI DMSTYLE_DllRegisterServer() ...@@ -605,8 +569,7 @@ HRESULT WINAPI DMSTYLE_DllRegisterServer()
/*********************************************************************** /***********************************************************************
* DllUnregisterServer (DMSTYLE.4) * DllUnregisterServer (DMSTYLE.4)
*/ */
HRESULT WINAPI DMSTYLE_DllUnregisterServer() HRESULT WINAPI DMSTYLE_DllUnregisterServer() {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
......
/* /*
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Style Engine" #define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Style Engine"
#define WINE_FILENAME_STR "dmstyle.dll" #define WINE_FILENAME_STR "dmstyle.dll"
#define WINE_FILEVERSION 4,8,1,881 #define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.8.1.881" #define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,8,1,881 #define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.8" #define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX" #define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
/* DirectMusicSynthesizer Main /* DirectMusicSynthesizer Main
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dmsynth); WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
typedef struct typedef struct {
{
/* IUnknown fields */ /* IUnknown fields */
ICOM_VFIELD(IClassFactory); ICOM_VFIELD(IClassFactory);
DWORD ref; DWORD ref;
...@@ -31,43 +30,30 @@ typedef struct ...@@ -31,43 +30,30 @@ typedef struct
/****************************************************************** /******************************************************************
* DirectMusicSynth ClassFactory * DirectMusicSynth ClassFactory
*/ */
static HRESULT WINAPI SynthCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) static HRESULT WINAPI SynthCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI SynthCF_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI SynthCF_AddRef(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI SynthCF_Release(LPCLASSFACTORY iface) static ULONG WINAPI SynthCF_Release(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */ /* static class, won't be freed */
return --(This->ref); return --(This->ref);
} }
static HRESULT WINAPI SynthCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) static HRESULT WINAPI SynthCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj); TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicSynth) || return DMUSIC_CreateDirectMusicSynthImpl (riid, ppobj, pOuter);
IsEqualIID (riid, &IID_IDirectMusicSynth8)) {
return DMUSIC_CreateDirectMusicSynth (riid, (LPDIRECTMUSICSYNTH8*)ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
} }
static HRESULT WINAPI SynthCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) static HRESULT WINAPI SynthCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock); FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK; return S_OK;
...@@ -87,42 +73,30 @@ static IClassFactoryImpl Synth_CF = {&SynthCF_Vtbl, 1 }; ...@@ -87,42 +73,30 @@ static IClassFactoryImpl Synth_CF = {&SynthCF_Vtbl, 1 };
/****************************************************************** /******************************************************************
* DirectMusicSynthSink ClassFactory * DirectMusicSynthSink ClassFactory
*/ */
static HRESULT WINAPI SynthSinkCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) static HRESULT WINAPI SynthSinkCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI SynthSinkCF_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI SynthSinkCF_AddRef(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI SynthSinkCF_Release(LPCLASSFACTORY iface) static ULONG WINAPI SynthSinkCF_Release(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */ /* static class, won't be freed */
return --(This->ref); return --(This->ref);
} }
static HRESULT WINAPI SynthSinkCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) static HRESULT WINAPI SynthSinkCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj); TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicSynthSink)) { return DMUSIC_CreateDirectMusicSynthSinkImpl (riid, ppobj, pOuter);
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 SynthSinkCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) static HRESULT WINAPI SynthSinkCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock); FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK; return S_OK;
...@@ -144,15 +118,11 @@ static IClassFactoryImpl SynthSink_CF = {&SynthSinkCF_Vtbl, 1 }; ...@@ -144,15 +118,11 @@ static IClassFactoryImpl SynthSink_CF = {&SynthSinkCF_Vtbl, 1 };
* *
* *
*/ */
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
{ if (fdwReason == DLL_PROCESS_ATTACH) {
if (fdwReason == DLL_PROCESS_ATTACH) DisableThreadLibraryCalls(hinstDLL);
{
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */ /* FIXME: Initialisation */
} } else if (fdwReason == DLL_PROCESS_DETACH) {
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */ /* FIXME: Cleanup */
} }
...@@ -165,10 +135,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -165,10 +135,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
* *
* *
*/ */
HRESULT WINAPI DMSYNTH_DllCanUnloadNow(void) HRESULT WINAPI DMSYNTH_DllCanUnloadNow(void) {
{
FIXME("(void): stub\n"); FIXME("(void): stub\n");
return S_FALSE; return S_FALSE;
} }
...@@ -178,8 +146,7 @@ HRESULT WINAPI DMSYNTH_DllCanUnloadNow(void) ...@@ -178,8 +146,7 @@ HRESULT WINAPI DMSYNTH_DllCanUnloadNow(void)
* *
* *
*/ */
HRESULT WINAPI DMSYNTH_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) HRESULT WINAPI DMSYNTH_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusicSynth) && IsEqualIID (riid, &IID_IClassFactory)) { if (IsEqualCLSID (rclsid, &CLSID_DirectMusicSynth) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &Synth_CF; *ppv = (LPVOID) &Synth_CF;
......
/* DirectMusicSynthesizer Private Include /* DirectMusicSynthesizer Private Include
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -23,16 +23,19 @@ ...@@ -23,16 +23,19 @@
#include <stdarg.h> #include <stdarg.h>
#include "windef.h" #include "windef.h"
#include "wine/debug.h"
#include "winbase.h" #include "winbase.h"
#include "winnt.h" #include "winnt.h"
#include "wingdi.h" #include "wingdi.h"
#include "dmusicc.h" #include "winuser.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "winreg.h"
#include "dmusici.h" #include "dmusici.h"
#include "dmusics.h"
#include "dmplugin.h"
#include "dmusicf.h" #include "dmusicf.h"
#include "dsound.h" #include "dmusics.h"
/***************************************************************************** /*****************************************************************************
* Interfaces * Interfaces
...@@ -49,20 +52,13 @@ extern ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl; ...@@ -49,20 +52,13 @@ extern ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl;
/***************************************************************************** /*****************************************************************************
* ClassFactory * ClassFactory
*/ */
/* can support IID_IDirectMusicSynth and IID_IDirectMusicSynth8 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
* return always an IDirectMusicSynthImpl extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
*/
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 * IDirectMusicSynth8Impl implementation structure
*/ */
struct IDirectMusicSynth8Impl struct IDirectMusicSynth8Impl {
{
/* IUnknown fields */ /* IUnknown fields */
ICOM_VFIELD(IDirectMusicSynth8); ICOM_VFIELD(IDirectMusicSynth8);
DWORD ref; DWORD ref;
...@@ -106,8 +102,7 @@ extern HRESULT WINAPI IDirectMusicSynth8Impl_AssignChannelToBuses (LPDIRECTMUSIC ...@@ -106,8 +102,7 @@ extern HRESULT WINAPI IDirectMusicSynth8Impl_AssignChannelToBuses (LPDIRECTMUSIC
/***************************************************************************** /*****************************************************************************
* IDirectMusicSynthSinkImpl implementation structure * IDirectMusicSynthSinkImpl implementation structure
*/ */
struct IDirectMusicSynthSinkImpl struct IDirectMusicSynthSinkImpl {
{
/* IUnknown fields */ /* IUnknown fields */
ICOM_VFIELD(IDirectMusicSynthSink); ICOM_VFIELD(IDirectMusicSynthSink);
DWORD ref; DWORD ref;
......
...@@ -18,21 +18,7 @@ ...@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include "dmsynth_private.h"
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmsynth); WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmsynth); ...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
/*********************************************************************** /***********************************************************************
* interface for self-registering * interface for self-registering
*/ */
struct regsvr_interface struct regsvr_interface {
{
IID const *iid; /* NULL for end of list */ IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */ IID const *base_iid; /* can be NULL to omit */
...@@ -57,8 +42,7 @@ struct regsvr_interface ...@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list); static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list); static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass struct regsvr_coclass {
{
CLSID const *clsid; /* NULL for end of list */ CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */ LPCSTR ips; /* can be NULL to omit */
...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); ...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/*********************************************************************** /***********************************************************************
* register_interfaces * register_interfaces
*/ */
static HRESULT register_interfaces(struct regsvr_interface const *list) static HRESULT register_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -194,8 +177,7 @@ error_return: ...@@ -194,8 +177,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_interfaces * unregister_interfaces
*/ */
static HRESULT unregister_interfaces(struct regsvr_interface const *list) static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -219,8 +201,7 @@ error_return: ...@@ -219,8 +201,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* register_coclasses * register_coclasses
*/ */
static HRESULT register_coclasses(struct regsvr_coclass const *list) static HRESULT register_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -301,8 +282,7 @@ error_return: ...@@ -301,8 +282,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_coclasses * unregister_coclasses
*/ */
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -338,8 +318,7 @@ error_return: ...@@ -338,8 +318,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* regsvr_key_guid * regsvr_key_guid
*/ */
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
{
WCHAR buf[39]; WCHAR buf[39];
StringFromGUID2(guid, buf, 39); StringFromGUID2(guid, buf, 39);
...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) ...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW( static LONG register_key_defvalueW(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
WCHAR const *value) WCHAR const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW( ...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA( static LONG register_key_defvalueA(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
char const *value) char const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -394,8 +371,7 @@ static LONG register_progid( ...@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid, char const *progid,
char const *curver_progid, char const *curver_progid,
char const *name, char const *name,
char const *extra) char const *extra) {
{
LONG res; LONG res;
HKEY progid_key; HKEY progid_key;
...@@ -439,8 +415,7 @@ error_close_progid_key: ...@@ -439,8 +415,7 @@ error_close_progid_key:
/*********************************************************************** /***********************************************************************
* recursive_delete_key * recursive_delete_key
*/ */
static LONG recursive_delete_key(HKEY key) static LONG recursive_delete_key(HKEY key) {
{
LONG res; LONG res;
WCHAR subkey_name[MAX_PATH]; WCHAR subkey_name[MAX_PATH];
DWORD cName; DWORD cName;
...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key) ...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyA * recursive_delete_keyA
*/ */
static LONG recursive_delete_keyA(HKEY base, char const *name) static LONG recursive_delete_keyA(HKEY base, char const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name) ...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyW * recursive_delete_keyW
*/ */
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = { ...@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = {
/*********************************************************************** /***********************************************************************
* DllRegisterServer (DMSYNTH.3) * DllRegisterServer (DMSYNTH.3)
*/ */
HRESULT WINAPI DMSYNTH_DllRegisterServer(void) HRESULT WINAPI DMSYNTH_DllRegisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
...@@ -549,8 +521,7 @@ HRESULT WINAPI DMSYNTH_DllRegisterServer(void) ...@@ -549,8 +521,7 @@ HRESULT WINAPI DMSYNTH_DllRegisterServer(void)
/*********************************************************************** /***********************************************************************
* DllUnregisterServer (DMSYNTH.4) * DllUnregisterServer (DMSYNTH.4)
*/ */
HRESULT WINAPI DMSYNTH_DllUnregisterServer(void) HRESULT WINAPI DMSYNTH_DllUnregisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
......
/* IDirectMusicSynthSink Implementation /* IDirectMusicSynthSink Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,21 +17,12 @@ ...@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmsynth_private.h" #include "dmsynth_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmsynth); WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
/* IDirectMusicSynthSink IUnknown part: */ /* IDirectMusicSynthSinkImpl IUnknown part: */
HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || if (IsEqualIID (riid, &IID_IUnknown) ||
...@@ -40,20 +31,17 @@ HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK ...@@ -40,20 +31,17 @@ HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK
*ppobj = This; *ppobj = This;
return S_OK; return S_OK;
} }
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj); WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface) ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface) ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -63,81 +51,56 @@ ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface) ...@@ -63,81 +51,56 @@ ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface)
return ref; return ref;
} }
/* IDirectMusicSynth IDirectMusicSynth part: */ /* IDirectMusicSynthSinkImpl IDirectMusicSynthSink part: */
HRESULT WINAPI IDirectMusicSynthSinkImpl_Init (LPDIRECTMUSICSYNTHSINK iface, IDirectMusicSynth* pSynth) HRESULT WINAPI IDirectMusicSynthSinkImpl_Init (LPDIRECTMUSICSYNTHSINK iface, IDirectMusicSynth* pSynth) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pSynth); FIXME("(%p, %p): stub\n", This, pSynth);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock* pClock) HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock* pClock) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pClock); FIXME("(%p, %p): stub\n", This, pClock);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSynthSinkImpl_GetLatencyClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock** ppClock) HRESULT WINAPI IDirectMusicSynthSinkImpl_GetLatencyClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock** ppClock) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, ppClock); FIXME("(%p, %p): stub\n", This, ppClock);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSynthSinkImpl_Activate (LPDIRECTMUSICSYNTHSINK iface, BOOL fEnable) HRESULT WINAPI IDirectMusicSynthSinkImpl_Activate (LPDIRECTMUSICSYNTHSINK iface, BOOL fEnable) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %d): stub\n", This, fEnable); FIXME("(%p, %d): stub\n", This, fEnable);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSynthSinkImpl_SampleToRefTime (LPDIRECTMUSICSYNTHSINK iface, LONGLONG llSampleTime, REFERENCE_TIME* prfTime) HRESULT WINAPI IDirectMusicSynthSinkImpl_SampleToRefTime (LPDIRECTMUSICSYNTHSINK iface, LONGLONG llSampleTime, REFERENCE_TIME* prfTime) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %lli, %p): stub\n", This, llSampleTime, prfTime); FIXME("(%p, %lli, %p): stub\n", This, llSampleTime, prfTime);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSynthSinkImpl_RefTimeToSample (LPDIRECTMUSICSYNTHSINK iface, REFERENCE_TIME rfTime, LONGLONG* pllSampleTime) HRESULT WINAPI IDirectMusicSynthSinkImpl_RefTimeToSample (LPDIRECTMUSICSYNTHSINK iface, REFERENCE_TIME rfTime, LONGLONG* pllSampleTime) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %lli, %p): stub\n", This, rfTime, pllSampleTime ); FIXME("(%p, %lli, %p): stub\n", This, rfTime, pllSampleTime );
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSynthSinkImpl_SetDirectSound (LPDIRECTMUSICSYNTHSINK iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) HRESULT WINAPI IDirectMusicSynthSinkImpl_SetDirectSound (LPDIRECTMUSICSYNTHSINK iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pDirectSound, pDirectSoundBuffer); FIXME("(%p, %p, %p): stub\n", This, pDirectSound, pDirectSoundBuffer);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicSynthSinkImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNTHSINK iface, LPDWORD pdwBufferSizeInSamples) HRESULT WINAPI IDirectMusicSynthSinkImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNTHSINK iface, LPDWORD pdwBufferSizeInSamples) {
{
ICOM_THIS(IDirectMusicSynthSinkImpl,iface); ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pdwBufferSizeInSamples); FIXME("(%p, %p): stub\n", This, pdwBufferSizeInSamples);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl = ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicSynthSinkImpl_QueryInterface, IDirectMusicSynthSinkImpl_QueryInterface,
IDirectMusicSynthSinkImpl_AddRef, IDirectMusicSynthSinkImpl_AddRef,
...@@ -153,23 +116,17 @@ ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl = ...@@ -153,23 +116,17 @@ ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl =
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSink (LPCGUID lpcGUID, LPDIRECTMUSICSYNTHSINK* ppDMSynthSink, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
{ IDirectMusicSynthSinkImpl *obj;
IDirectMusicSynthSinkImpl *dmsink;
TRACE("(%p,%p,%p)\n", lpcGUID, ppDMSynthSink, pUnkOuter); TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter);
if (IsEqualIID (lpcGUID, &IID_IDirectMusicSynthSink)) { obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSynthSinkImpl));
dmsink = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSynthSinkImpl)); if (NULL == obj) {
if (NULL == dmsink) { *ppobj = (LPDIRECTMUSICSYNTHSINK) NULL;
*ppDMSynthSink = (LPDIRECTMUSICSYNTHSINK) NULL; return E_OUTOFMEMORY;
return E_OUTOFMEMORY;
}
dmsink->lpVtbl = &DirectMusicSynthSink_Vtbl;
dmsink->ref = 1;
*ppDMSynthSink = (LPDIRECTMUSICSYNTHSINK) dmsink;
return S_OK;
} }
obj->lpVtbl = &DirectMusicSynthSink_Vtbl;
obj->ref = 0;
WARN("No interface found\n"); return IDirectMusicSynthSinkImpl_QueryInterface((LPDIRECTMUSICSYNTHSINK)obj, lpcGUID, ppobj);
return E_NOINTERFACE;
} }
/* /*
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Software Synthesizer" #define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Software Synthesizer"
#define WINE_FILENAME_STR "dmsynth.dll" #define WINE_FILENAME_STR "dmsynth.dll"
#define WINE_FILEVERSION 4,8,1,881 #define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.8.1.881" #define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,8,1,881 #define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.8" #define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX" #define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
/* IDirectMusicBuffer Implementation /* IDirectMusicBuffer Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,54 +17,30 @@ ...@@ -17,54 +17,30 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include "config.h"
#include <stdarg.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" #include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicBuffer IUnknown parts follow: */ /* IDirectMusicBufferImpl IUnknown part: */
HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface (LPDIRECTMUSICBUFFER iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface (LPDIRECTMUSICBUFFER iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) if (IsEqualIID (riid, &IID_IUnknown)
|| IsEqualIID (riid, &IID_IDirectMusicBuffer)) { || IsEqualIID (riid, &IID_IDirectMusicBuffer)) {
IDirectMusicBufferImpl_AddRef(iface); IDirectMusicBufferImpl_AddRef(iface);
*ppobj = This; *ppobj = This;
return S_OK; return S_OK;
} }
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicBufferImpl_AddRef (LPDIRECTMUSICBUFFER iface) ULONG WINAPI IDirectMusicBufferImpl_AddRef (LPDIRECTMUSICBUFFER iface) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface) ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -74,126 +50,86 @@ ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface) ...@@ -74,126 +50,86 @@ ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface)
return ref; return ref;
} }
/* IDirectMusicBuffer Interface follow: */ /* IDirectMusicBufferImpl IDirectMusicBuffer part: */
HRESULT WINAPI IDirectMusicBufferImpl_Flush (LPDIRECTMUSICBUFFER iface) HRESULT WINAPI IDirectMusicBufferImpl_Flush (LPDIRECTMUSICBUFFER iface) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_TotalTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prtTime) HRESULT WINAPI IDirectMusicBufferImpl_TotalTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prtTime) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, prtTime);
FIXME("(%p, %p): stub\n", This, prtTime);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_PackStructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage) HRESULT WINAPI IDirectMusicBufferImpl_PackStructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %lli, %ld, %ld): stub\n", This, rt, dwChannelGroup, dwChannelMessage); FIXME("(%p, %lli, %ld, %ld): stub\n", This, rt, dwChannelGroup, dwChannelMessage);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb) HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %lli, %ld, %ld, %p): stub\n", This, rt, dwChannelGroup, cb, lpb); FIXME("(%p, %lli, %ld, %ld, %p): stub\n", This, rt, dwChannelGroup, cb, lpb);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_ResetReadPtr (LPDIRECTMUSICBUFFER iface) HRESULT WINAPI IDirectMusicBufferImpl_ResetReadPtr (LPDIRECTMUSICBUFFER iface) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_GetNextEvent (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE* ppData) HRESULT WINAPI IDirectMusicBufferImpl_GetNextEvent (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE* ppData) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p, %p, %p, %p): stub\n", This, prt, pdwChannelGroup, pdwLength, ppData); FIXME("(%p, %p, %p, %p, %p): stub\n", This, prt, pdwChannelGroup, pdwLength, ppData);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_GetRawBufferPtr (LPDIRECTMUSICBUFFER iface, LPBYTE* ppData) HRESULT WINAPI IDirectMusicBufferImpl_GetRawBufferPtr (LPDIRECTMUSICBUFFER iface, LPBYTE* ppData) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, ppData); FIXME("(%p, %p): stub\n", This, ppData);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_GetStartTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt) HRESULT WINAPI IDirectMusicBufferImpl_GetStartTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, prt); FIXME("(%p, %p): stub\n", This, prt);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_GetUsedBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb) HRESULT WINAPI IDirectMusicBufferImpl_GetUsedBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, pcb); FIXME("(%p, %p): stub\n", This, pcb);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_GetMaxBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb) HRESULT WINAPI IDirectMusicBufferImpl_GetMaxBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, pcb); FIXME("(%p, %p): stub\n", This, pcb);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_GetBufferFormat (LPDIRECTMUSICBUFFER iface, LPGUID pGuidFormat) HRESULT WINAPI IDirectMusicBufferImpl_GetBufferFormat (LPDIRECTMUSICBUFFER iface, LPGUID pGuidFormat) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, pGuidFormat); FIXME("(%p, %p): stub\n", This, pGuidFormat);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_SetStartTime (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt) HRESULT WINAPI IDirectMusicBufferImpl_SetStartTime (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %lli): stub\n", This, rt); FIXME("(%p, %lli): stub\n", This, rt);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, DWORD cb) HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, DWORD cb) {
{
ICOM_THIS(IDirectMusicBufferImpl,iface); ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %ld): stub\n", This, cb); FIXME("(%p, %ld): stub\n", This, cb);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl = ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicBufferImpl_QueryInterface, IDirectMusicBufferImpl_QueryInterface,
IDirectMusicBufferImpl_AddRef, IDirectMusicBufferImpl_AddRef,
...@@ -214,13 +150,16 @@ ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl = ...@@ -214,13 +150,16 @@ ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl =
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicBuffer (LPCGUID lpcGUID, LPDIRECTMUSICBUFFER* ppDMBuff, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateDirectMusicBufferImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
{ IDirectMusicBufferImpl* dmbuff;
if (IsEqualIID (lpcGUID, &IID_IDirectMusicBuffer)) {
FIXME("Not yet\n"); dmbuff = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBufferImpl));
return E_NOINTERFACE; if (NULL == dmbuff) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
} }
dmbuff->lpVtbl = &DirectMusicBuffer_Vtbl;
dmbuff->ref = 0; /* will be inited by QueryInterface */
WARN("No interface found\n"); return IDirectMusicBufferImpl_QueryInterface ((LPDIRECTMUSICBUFFER)dmbuff, lpcGUID, ppobj);
return E_NOINTERFACE;
} }
/* IReferenceClock Implementation /* IReferenceClock Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,21 +17,12 @@ ...@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h" #include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IReferenceClock IUnknown parts follow: */ /* IReferenceClockImpl IUnknown part: */
HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IReferenceClockImpl,iface); ICOM_THIS(IReferenceClockImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || if (IsEqualIID (riid, &IID_IUnknown) ||
...@@ -40,20 +31,17 @@ HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface, REFII ...@@ -40,20 +31,17 @@ HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface, REFII
*ppobj = This; *ppobj = This;
return S_OK; return S_OK;
} }
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj); WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IReferenceClockImpl_AddRef (IReferenceClock *iface) ULONG WINAPI IReferenceClockImpl_AddRef (IReferenceClock *iface) {
{
ICOM_THIS(IReferenceClockImpl,iface); ICOM_THIS(IReferenceClockImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IReferenceClockImpl_Release (IReferenceClock *iface) ULONG WINAPI IReferenceClockImpl_Release (IReferenceClock *iface) {
{
ICOM_THIS(IReferenceClockImpl,iface); ICOM_THIS(IReferenceClockImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -63,46 +51,33 @@ ULONG WINAPI IReferenceClockImpl_Release (IReferenceClock *iface) ...@@ -63,46 +51,33 @@ ULONG WINAPI IReferenceClockImpl_Release (IReferenceClock *iface)
return ref; return ref;
} }
/* IReferenceClock Interface follow: */ /* IReferenceClockImpl IReferenceClock part: */
HRESULT WINAPI IReferenceClockImpl_GetTime (IReferenceClock *iface, REFERENCE_TIME* pTime) HRESULT WINAPI IReferenceClockImpl_GetTime (IReferenceClock *iface, REFERENCE_TIME* pTime) {
{
ICOM_THIS(IReferenceClockImpl,iface); ICOM_THIS(IReferenceClockImpl,iface);
TRACE("(%p, %p)\n", This, pTime); TRACE("(%p, %p)\n", This, pTime);
*pTime = This->rtTime; *pTime = This->rtTime;
return S_OK; return S_OK;
} }
HRESULT WINAPI IReferenceClockImpl_AdviseTime (IReferenceClock *iface, REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD* pdwAdviseCookie) HRESULT WINAPI IReferenceClockImpl_AdviseTime (IReferenceClock *iface, REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD* pdwAdviseCookie) {
{
ICOM_THIS(IReferenceClockImpl,iface); ICOM_THIS(IReferenceClockImpl,iface);
FIXME("(%p, %lli, %lli, %p, %p): stub\n", This, baseTime, streamTime, hEvent, pdwAdviseCookie); FIXME("(%p, %lli, %lli, %p, %p): stub\n", This, baseTime, streamTime, hEvent, pdwAdviseCookie);
return S_OK; return S_OK;
} }
HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic (IReferenceClock *iface, REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD* pdwAdviseCookie) HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic (IReferenceClock *iface, REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD* pdwAdviseCookie) {
{
ICOM_THIS(IReferenceClockImpl,iface); ICOM_THIS(IReferenceClockImpl,iface);
FIXME("(%p, %lli, %lli, %p, %p): stub\n", This, startTime, periodTime, hSemaphore, pdwAdviseCookie); FIXME("(%p, %lli, %lli, %p, %p): stub\n", This, startTime, periodTime, hSemaphore, pdwAdviseCookie);
return S_OK; return S_OK;
} }
HRESULT WINAPI IReferenceClockImpl_Unadvise (IReferenceClock *iface, DWORD dwAdviseCookie) HRESULT WINAPI IReferenceClockImpl_Unadvise (IReferenceClock *iface, DWORD dwAdviseCookie) {
{
ICOM_THIS(IReferenceClockImpl,iface); ICOM_THIS(IReferenceClockImpl,iface);
FIXME("(%p, %ld): stub\n", This, dwAdviseCookie); FIXME("(%p, %ld): stub\n", This, dwAdviseCookie);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl = ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IReferenceClockImpl_QueryInterface, IReferenceClockImpl_QueryInterface,
IReferenceClockImpl_AddRef, IReferenceClockImpl_AddRef,
...@@ -114,26 +89,18 @@ ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl = ...@@ -114,26 +89,18 @@ ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl =
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateReferenceClock (LPCGUID lpcGUID, IReferenceClock** ppRC, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateReferenceClockImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
{
IReferenceClockImpl* clock; IReferenceClockImpl* clock;
if (IsEqualIID (lpcGUID, &IID_IReferenceClock)) clock = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IReferenceClockImpl));
{ if (NULL == clock) {
clock = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IReferenceClockImpl)); *ppobj = NULL;
if (NULL == clock) { return E_OUTOFMEMORY;
*ppRC = NULL;
return E_OUTOFMEMORY;
}
clock->lpVtbl = &ReferenceClock_Vtbl;
clock->ref = 1;
clock->rtTime = 0;
clock->pClockInfo.dwSize = sizeof (DMUS_CLOCKINFO);
*ppRC = (IReferenceClock *) clock;
return S_OK;
} }
clock->lpVtbl = &ReferenceClock_Vtbl;
WARN("No interface found\n"); clock->ref = 0; /* will be inited by QueryInterface */
return E_NOINTERFACE; clock->rtTime = 0;
clock->pClockInfo.dwSize = sizeof (DMUS_CLOCKINFO);
return IReferenceClockImpl_QueryInterface ((IReferenceClock *)clock, lpcGUID, ppobj);
} }
/* IDirectMusic8 Implementation /* IDirectMusic8 Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -16,33 +16,16 @@ ...@@ -16,33 +16,16 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "wingdi.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" #include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusic8 IUnknown parts follow: */ /* IDirectMusic8Impl IUnknown part: */
HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IDirectMusic) ||
IsEqualIID (riid, &IID_IDirectMusic2) || IsEqualIID (riid, &IID_IDirectMusic2) ||
IsEqualIID (riid, &IID_IDirectMusic8)) { IsEqualIID (riid, &IID_IDirectMusic8)) {
IDirectMusic8Impl_AddRef(iface); IDirectMusic8Impl_AddRef(iface);
...@@ -54,15 +37,13 @@ HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID ri ...@@ -54,15 +37,13 @@ HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID ri
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusic8Impl_AddRef (LPDIRECTMUSIC8 iface) ULONG WINAPI IDirectMusic8Impl_AddRef (LPDIRECTMUSIC8 iface) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface) ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -72,9 +53,8 @@ ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface) ...@@ -72,9 +53,8 @@ ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface)
return ref; return ref;
} }
/* IDirectMusic8 Interface follow: */ /* IDirectMusic8Impl IDirectMusic part: */
HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps) HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
TRACE("(%p, %ld, %p)\n", This, dwIndex, pPortCaps); TRACE("(%p, %ld, %p)\n", This, dwIndex, pPortCaps);
...@@ -115,17 +95,13 @@ HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwIndex, L ...@@ -115,17 +95,13 @@ HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwIndex, L
return S_FALSE; return S_FALSE;
} }
HRESULT WINAPI IDirectMusic8Impl_CreateMusicBuffer (LPDIRECTMUSIC8 iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter) HRESULT WINAPI IDirectMusic8Impl_CreateMusicBuffer (LPDIRECTMUSIC8 iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %p, %p, %p): stub\n", This, pBufferDesc, ppBuffer, pUnkOuter); FIXME("(%p, %p, %p, %p): stub\n", This, pBufferDesc, ppBuffer, pUnkOuter);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter) HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
int i/*, j*/; int i/*, j*/;
DMUS_PORTCAPS PortCaps; DMUS_PORTCAPS PortCaps;
...@@ -145,7 +121,7 @@ HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rcls ...@@ -145,7 +121,7 @@ HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rcls
This->ppPorts[This->nrofports]->pCaps = &PortCaps; This->ppPorts[This->nrofports]->pCaps = &PortCaps;
This->ppPorts[This->nrofports]->pParams = pPortParams; /* this one is here just because there's a funct. which retrieves it back */ This->ppPorts[This->nrofports]->pParams = pPortParams; /* this one is here just because there's a funct. which retrieves it back */
This->ppPorts[This->nrofports]->pDirectSound = NULL; This->ppPorts[This->nrofports]->pDirectSound = NULL;
DMUSIC_CreateReferenceClock (&IID_IReferenceClock, (IReferenceClock**)&This->ppPorts[This->nrofports]->pLatencyClock, NULL); DMUSIC_CreateReferenceClockImpl (&IID_IReferenceClock, (LPVOID*)&This->ppPorts[This->nrofports]->pLatencyClock, NULL);
#if 0 #if 0
if (pPortParams->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) { if (pPortParams->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) {
...@@ -181,17 +157,13 @@ HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rcls ...@@ -181,17 +157,13 @@ HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rcls
return E_NOINTERFACE; return E_NOINTERFACE;
} }
HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwIndex, lpClockInfo); FIXME("(%p, %ld, %p): stub\n", This, dwIndex, lpClockInfo);
return S_FALSE; return S_FALSE;
} }
HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock) HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
TRACE("(%p, %p, %p)\n", This, pguidClock, ppReferenceClock); TRACE("(%p, %p, %p)\n", This, pguidClock, ppReferenceClock);
...@@ -203,31 +175,25 @@ HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pg ...@@ -203,31 +175,25 @@ HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pg
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusic8Impl_SetMasterClock (LPDIRECTMUSIC8 iface, REFGUID rguidClock) HRESULT WINAPI IDirectMusic8Impl_SetMasterClock (LPDIRECTMUSIC8 iface, REFGUID rguidClock) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidClock)); FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidClock));
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusic8Impl_Activate (LPDIRECTMUSIC8 iface, BOOL fEnable) HRESULT WINAPI IDirectMusic8Impl_Activate (LPDIRECTMUSIC8 iface, BOOL fEnable) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
int i; int i;
FIXME("(%p, %d): stub\n", This, fEnable); FIXME("(%p, %d): stub\n", This, fEnable);
for (i = 0; i < This->nrofports; i++) for (i = 0; i < This->nrofports; i++) {
{
This->ppPorts[i]->fActive = fEnable; This->ppPorts[i]->fActive = fEnable;
} }
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pguidPort) HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pguidPort) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
HKEY hkGUID; HKEY hkGUID;
DWORD returnTypeGUID, sizeOfReturnBuffer = 50; DWORD returnTypeGUID, sizeOfReturnBuffer = 50;
...@@ -251,26 +217,19 @@ HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pg ...@@ -251,26 +217,19 @@ HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pg
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusic8Impl_SetDirectSound (LPDIRECTMUSIC8 iface, LPDIRECTSOUND pDirectSound, HWND hWnd) HRESULT WINAPI IDirectMusic8Impl_SetDirectSound (LPDIRECTMUSIC8 iface, LPDIRECTSOUND pDirectSound, HWND hWnd) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %p, %p): stub\n", This, pDirectSound, hWnd); FIXME("(%p, %p, %p): stub\n", This, pDirectSound, hWnd);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock (LPDIRECTMUSIC8 iface, IReferenceClock* pClock) HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock (LPDIRECTMUSIC8 iface, IReferenceClock* pClock) {
{
ICOM_THIS(IDirectMusic8Impl,iface); ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %p): stub\n", This, pClock); FIXME("(%p, %p): stub\n", This, pClock);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusic8) DirectMusic8_Vtbl = ICOM_VTABLE(IDirectMusic8) DirectMusic8_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusic8Impl_QueryInterface, IDirectMusic8Impl_QueryInterface,
IDirectMusic8Impl_AddRef, IDirectMusic8Impl_AddRef,
...@@ -288,8 +247,7 @@ ICOM_VTABLE(IDirectMusic8) DirectMusic8_Vtbl = ...@@ -288,8 +247,7 @@ ICOM_VTABLE(IDirectMusic8) DirectMusic8_Vtbl =
}; };
/* helper stuff */ /* helper stuff */
void register_waveport (LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext) void register_waveport (LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext) {
{
LPDMUS_PORTCAPS pPortCaps = (LPDMUS_PORTCAPS)lpContext; LPDMUS_PORTCAPS pPortCaps = (LPDMUS_PORTCAPS)lpContext;
pPortCaps->dwSize = sizeof(DMUS_PORTCAPS); pPortCaps->dwSize = sizeof(DMUS_PORTCAPS);
...@@ -306,30 +264,22 @@ void register_waveport (LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVO ...@@ -306,30 +264,22 @@ void register_waveport (LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVO
} }
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusic (LPCGUID lpcGUID, LPDIRECTMUSIC8 *ppDM, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateDirectMusicImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
{
IDirectMusic8Impl *dmusic; IDirectMusic8Impl *dmusic;
TRACE("(%p,%p,%p)\n",lpcGUID, ppDM, pUnkOuter); TRACE("(%p,%p,%p)\n",lpcGUID, ppobj, pUnkOuter);
if (IsEqualIID (lpcGUID, &IID_IDirectMusic) ||
IsEqualIID (lpcGUID, &IID_IDirectMusic2) || dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl));
IsEqualIID (lpcGUID, &IID_IDirectMusic8)) { if (NULL == dmusic) {
dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl)); *ppobj = (LPDIRECTMUSIC8) NULL;
if (NULL == dmusic) { return E_OUTOFMEMORY;
*ppDM = (LPDIRECTMUSIC8) NULL;
return E_OUTOFMEMORY;
}
dmusic->lpVtbl = &DirectMusic8_Vtbl;
dmusic->ref = 1;
dmusic->pMasterClock = NULL;
dmusic->ppPorts = NULL;
dmusic->nrofports = 0;
DMUSIC_CreateReferenceClock (&IID_IReferenceClock, (IReferenceClock**)&dmusic->pMasterClock, NULL);
*ppDM = (LPDIRECTMUSIC8) dmusic;
return S_OK;
} }
dmusic->lpVtbl = &DirectMusic8_Vtbl;
dmusic->ref = 0; /* will be inited with QueryInterface */
dmusic->pMasterClock = NULL;
dmusic->ppPorts = NULL;
dmusic->nrofports = 0;
DMUSIC_CreateReferenceClockImpl (&IID_IReferenceClock, (LPVOID*)&dmusic->pMasterClock, NULL);
WARN("No interface found\n"); return IDirectMusic8Impl_QueryInterface ((LPDIRECTMUSIC8)dmusic, lpcGUID, ppobj);
return E_NOINTERFACE;
} }
/* DirectMusic Main /* DirectMusic Main
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
typedef struct typedef struct {
{
/* IUnknown fields */ /* IUnknown fields */
ICOM_VFIELD(IClassFactory); ICOM_VFIELD(IClassFactory);
DWORD ref; DWORD ref;
...@@ -31,44 +30,30 @@ typedef struct ...@@ -31,44 +30,30 @@ typedef struct
/****************************************************************** /******************************************************************
* DirectMusic ClassFactory * DirectMusic ClassFactory
*/ */
static HRESULT WINAPI DirectMusicCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) static HRESULT WINAPI DirectMusicCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI DirectMusicCF_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI DirectMusicCF_AddRef(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI DirectMusicCF_Release(LPCLASSFACTORY iface) static ULONG WINAPI DirectMusicCF_Release(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */ /* static class, won't be freed */
return --(This->ref); return --(This->ref);
} }
static HRESULT WINAPI DirectMusicCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) static HRESULT WINAPI DirectMusicCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj); TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusic) || return DMUSIC_CreateDirectMusicImpl (riid, (LPVOID*) ppobj, pOuter);
IsEqualIID (riid, &IID_IDirectMusic2) ||
IsEqualIID (riid, &IID_IDirectMusic8)) {
return DMUSIC_CreateDirectMusic (riid, (LPDIRECTMUSIC8*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
} }
static HRESULT WINAPI DirectMusicCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) static HRESULT WINAPI DirectMusicCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock); FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK; return S_OK;
...@@ -88,44 +73,30 @@ static IClassFactoryImpl DirectMusic_CF = {&DirectMusicCF_Vtbl, 1 }; ...@@ -88,44 +73,30 @@ static IClassFactoryImpl DirectMusic_CF = {&DirectMusicCF_Vtbl, 1 };
/****************************************************************** /******************************************************************
* DirectMusicCollection ClassFactory * DirectMusicCollection ClassFactory
*/ */
static HRESULT WINAPI CollectionCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) static HRESULT WINAPI CollectionCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI CollectionCF_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI CollectionCF_AddRef(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref); return ++(This->ref);
} }
static ULONG WINAPI CollectionCF_Release(LPCLASSFACTORY iface) static ULONG WINAPI CollectionCF_Release(LPCLASSFACTORY iface) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */ /* static class, won't be freed */
return --(This->ref); return --(This->ref);
} }
static HRESULT WINAPI CollectionCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) static HRESULT WINAPI CollectionCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj); TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicCollection)) { return DMUSIC_CreateDirectMusicCollectionImpl (riid, ppobj, pOuter);
return DMUSIC_CreateDirectMusicCollection (riid, (LPDIRECTMUSICCOLLECTION*)ppobj, pOuter);
} else if (IsEqualIID (riid, &IID_IDirectMusicObject)) {
return DMUSIC_CreateDirectMusicCollectionObject (riid, (LPDIRECTMUSICOBJECT*)ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
} }
static HRESULT WINAPI CollectionCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) static HRESULT WINAPI CollectionCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
{
ICOM_THIS(IClassFactoryImpl,iface); ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock); FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK; return S_OK;
...@@ -147,15 +118,11 @@ static IClassFactoryImpl Collection_CF = {&CollectionCF_Vtbl, 1 }; ...@@ -147,15 +118,11 @@ static IClassFactoryImpl Collection_CF = {&CollectionCF_Vtbl, 1 };
* *
* *
*/ */
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
{ if (fdwReason == DLL_PROCESS_ATTACH) {
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL); DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */ /* FIXME: Initialisation */
} } else if (fdwReason == DLL_PROCESS_DETACH) {
else if (fdwReason == DLL_PROCESS_DETACH)
{
/* FIXME: Cleanup */ /* FIXME: Cleanup */
} }
...@@ -168,10 +135,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -168,10 +135,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
* *
* *
*/ */
HRESULT WINAPI DMUSIC_DllCanUnloadNow(void) HRESULT WINAPI DMUSIC_DllCanUnloadNow(void) {
{
FIXME("(void): stub\n"); FIXME("(void): stub\n");
return S_FALSE; return S_FALSE;
} }
...@@ -181,8 +146,7 @@ HRESULT WINAPI DMUSIC_DllCanUnloadNow(void) ...@@ -181,8 +146,7 @@ HRESULT WINAPI DMUSIC_DllCanUnloadNow(void)
* *
* *
*/ */
HRESULT WINAPI DMUSIC_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) HRESULT WINAPI DMUSIC_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusic) && IsEqualIID (riid, &IID_IClassFactory)) { if (IsEqualCLSID (rclsid, &CLSID_DirectMusic) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &DirectMusic_CF; *ppv = (LPVOID) &DirectMusic_CF;
......
/* IDirectMusicDownload Implementation /* IDirectMusicDownload Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,30 +17,12 @@ ...@@ -17,30 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.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" #include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicDownload IUnknown parts follow: */ /* IDirectMusicDownloadImpl IUnknown part: */
HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusicDownloadImpl,iface); ICOM_THIS(IDirectMusicDownloadImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) if (IsEqualIID (riid, &IID_IUnknown)
...@@ -49,20 +31,17 @@ HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD if ...@@ -49,20 +31,17 @@ HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD if
*ppobj = This; *ppobj = This;
return S_OK; return S_OK;
} }
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicDownloadImpl_AddRef (LPDIRECTMUSICDOWNLOAD iface) ULONG WINAPI IDirectMusicDownloadImpl_AddRef (LPDIRECTMUSICDOWNLOAD iface) {
{
ICOM_THIS(IDirectMusicDownloadImpl,iface); ICOM_THIS(IDirectMusicDownloadImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicDownloadImpl_Release (LPDIRECTMUSICDOWNLOAD iface) ULONG WINAPI IDirectMusicDownloadImpl_Release (LPDIRECTMUSICDOWNLOAD iface) {
{
ICOM_THIS(IDirectMusicDownloadImpl,iface); ICOM_THIS(IDirectMusicDownloadImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -72,18 +51,14 @@ ULONG WINAPI IDirectMusicDownloadImpl_Release (LPDIRECTMUSICDOWNLOAD iface) ...@@ -72,18 +51,14 @@ ULONG WINAPI IDirectMusicDownloadImpl_Release (LPDIRECTMUSICDOWNLOAD iface)
return ref; return ref;
} }
/* IDirectMusicDownload Interface follow: */ /* IDirectMusicDownloadImpl IDirectMusicDownload part: */
HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer (LPDIRECTMUSICDOWNLOAD iface, void** ppvBuffer, DWORD* pdwSize) HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer (LPDIRECTMUSICDOWNLOAD iface, void** ppvBuffer, DWORD* pdwSize) {
{
ICOM_THIS(IDirectMusicDownloadImpl,iface); ICOM_THIS(IDirectMusicDownloadImpl,iface);
FIXME("(%p,%p, %p): stub\n", This, ppvBuffer, pdwSize); FIXME("(%p,%p, %p): stub\n", This, ppvBuffer, pdwSize);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusicDownload) DirectMusicDownload_Vtbl = ICOM_VTABLE(IDirectMusicDownload) DirectMusicDownload_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicDownloadImpl_QueryInterface, IDirectMusicDownloadImpl_QueryInterface,
IDirectMusicDownloadImpl_AddRef, IDirectMusicDownloadImpl_AddRef,
...@@ -92,13 +67,16 @@ ICOM_VTABLE(IDirectMusicDownload) DirectMusicDownload_Vtbl = ...@@ -92,13 +67,16 @@ ICOM_VTABLE(IDirectMusicDownload) DirectMusicDownload_Vtbl =
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicDownload (LPCGUID lpcGUID, LPDIRECTMUSICDOWNLOAD* ppDMDL, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
{ IDirectMusicDownloadImpl* dmdl;
if (IsEqualIID (lpcGUID, &IID_IDirectMusicDownload)) {
FIXME("Not yet\n"); dmdl = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicDownloadImpl));
return E_NOINTERFACE; if (NULL == dmdl) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
} }
dmdl->lpVtbl = &DirectMusicDownload_Vtbl;
dmdl->ref = 0; /* will be inited by QueryInterface */
WARN("No interface found\n"); return IDirectMusicDownloadImpl_QueryInterface ((LPDIRECTMUSICDOWNLOAD)dmdl, lpcGUID, ppobj);
return E_NOINTERFACE;
} }
/* IDirectMusicDownloadedInstrument Implementation /* IDirectMusicDownloadedInstrument Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,21 +17,12 @@ ...@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h" #include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicDownloadedInstrument IUnknown parts follow: */ /* IDirectMusicDownloadedInstrumentImpl IUnknown part: */
HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusicDownloadedInstrumentImpl,iface); ICOM_THIS(IDirectMusicDownloadedInstrumentImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) if (IsEqualIID (riid, &IID_IUnknown)
...@@ -40,20 +31,17 @@ HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSI ...@@ -40,20 +31,17 @@ HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSI
*ppobj = This; *ppobj = This;
return S_OK; return S_OK;
} }
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface) ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface) {
{
ICOM_THIS(IDirectMusicDownloadedInstrumentImpl,iface); ICOM_THIS(IDirectMusicDownloadedInstrumentImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface) ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface) {
{
ICOM_THIS(IDirectMusicDownloadedInstrumentImpl,iface); ICOM_THIS(IDirectMusicDownloadedInstrumentImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -63,11 +51,10 @@ ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOAD ...@@ -63,11 +51,10 @@ ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOAD
return ref; return ref;
} }
/* IDirectMusicDownloadedInstrument Interface follow: */ /* IDirectMusicDownloadedInstrumentImpl IDirectMusicDownloadedInstrument part: */
/* none at this time */ /* none at this time */
ICOM_VTABLE(IDirectMusicDownloadedInstrument) DirectMusicDownloadedInstrument_Vtbl = ICOM_VTABLE(IDirectMusicDownloadedInstrument) DirectMusicDownloadedInstrument_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicDownloadedInstrumentImpl_QueryInterface, IDirectMusicDownloadedInstrumentImpl_QueryInterface,
IDirectMusicDownloadedInstrumentImpl_AddRef, IDirectMusicDownloadedInstrumentImpl_AddRef,
...@@ -75,13 +62,16 @@ ICOM_VTABLE(IDirectMusicDownloadedInstrument) DirectMusicDownloadedInstrument_Vt ...@@ -75,13 +62,16 @@ ICOM_VTABLE(IDirectMusicDownloadedInstrument) DirectMusicDownloadedInstrument_Vt
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadedInstrument (LPCGUID lpcGUID, LPDIRECTMUSICDOWNLOADEDINSTRUMENT* ppDMDLInstrument, LPUNKNOWN pUnkOuter) HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadedInstrumentImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
{ IDirectMusicDownloadedInstrumentImpl* dmdlinst;
if (IsEqualIID (lpcGUID, &IID_IDirectMusicDownloadedInstrument)) {
FIXME("Not yet\n"); dmdlinst = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicDownloadedInstrumentImpl));
return E_NOINTERFACE; if (NULL == dmdlinst) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
} }
dmdlinst->lpVtbl = &DirectMusicDownloadedInstrument_Vtbl;
WARN("No interface found\n"); dmdlinst->ref = 0; /* will be inited by QueryInterface */
return E_NOINTERFACE;
return IDirectMusicDownloadedInstrumentImpl_QueryInterface ((LPDIRECTMUSICDOWNLOADEDINSTRUMENT)dmdlinst, lpcGUID, ppobj);
} }
/* IDirectMusicPort Implementation /* IDirectMusicPort Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,21 +17,12 @@ ...@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h" #include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicPort IUnknown parts follow: */ /* IDirectMusicPortImpl IUnknown part: */
HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort)) { if (IsEqualIID (riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort)) {
...@@ -39,20 +30,17 @@ HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REF ...@@ -39,20 +30,17 @@ HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REF
*ppobj = This; *ppobj = This;
return S_OK; return S_OK;
} }
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicPortImpl_AddRef (LPDIRECTMUSICPORT iface) ULONG WINAPI IDirectMusicPortImpl_AddRef (LPDIRECTMUSICPORT iface) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicPortImpl_Release (LPDIRECTMUSICPORT iface) ULONG WINAPI IDirectMusicPortImpl_Release (LPDIRECTMUSICPORT iface) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -62,166 +50,121 @@ ULONG WINAPI IDirectMusicPortImpl_Release (LPDIRECTMUSICPORT iface) ...@@ -62,166 +50,121 @@ ULONG WINAPI IDirectMusicPortImpl_Release (LPDIRECTMUSICPORT iface)
return ref; return ref;
} }
/* IDirectMusicPort Interface follow: */ /* IDirectMusicPortImpl IDirectMusicPort part: */
HRESULT WINAPI IDirectMusicPortImpl_PlayBuffer (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer) HRESULT WINAPI IDirectMusicPortImpl_PlayBuffer (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, pBuffer); FIXME("(%p, %p): stub\n", This, pBuffer);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_SetReadNotificationHandle (LPDIRECTMUSICPORT iface, HANDLE hEvent) HRESULT WINAPI IDirectMusicPortImpl_SetReadNotificationHandle (LPDIRECTMUSICPORT iface, HANDLE hEvent) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, hEvent); FIXME("(%p, %p): stub\n", This, hEvent);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_Read (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer) HRESULT WINAPI IDirectMusicPortImpl_Read (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, pBuffer); FIXME("(%p, %p): stub\n", This, pBuffer);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_DownloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicInstrument* pInstrument, IDirectMusicDownloadedInstrument** ppDownloadedInstrument, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges) HRESULT WINAPI IDirectMusicPortImpl_DownloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicInstrument* pInstrument, IDirectMusicDownloadedInstrument** ppDownloadedInstrument, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p, %p, %p, %ld): stub\n", This, pInstrument, ppDownloadedInstrument, pNoteRanges, dwNumNoteRanges); FIXME("(%p, %p, %p, %p, %ld): stub\n", This, pInstrument, ppDownloadedInstrument, pNoteRanges, dwNumNoteRanges);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_UnloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *pDownloadedInstrument) HRESULT WINAPI IDirectMusicPortImpl_UnloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *pDownloadedInstrument) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, pDownloadedInstrument); FIXME("(%p, %p): stub\n", This, pDownloadedInstrument);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_GetLatencyClock (LPDIRECTMUSICPORT iface, IReferenceClock** ppClock) HRESULT WINAPI IDirectMusicPortImpl_GetLatencyClock (LPDIRECTMUSICPORT iface, IReferenceClock** ppClock) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %p)\n", This, ppClock); TRACE("(%p, %p)\n", This, ppClock);
*ppClock = This->pLatencyClock; *ppClock = This->pLatencyClock;
IReferenceClock_AddRef (*ppClock); IReferenceClock_AddRef (*ppClock);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_GetRunningStats (LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS pStats) HRESULT WINAPI IDirectMusicPortImpl_GetRunningStats (LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS pStats) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, pStats); FIXME("(%p, %p): stub\n", This, pStats);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_Compact (LPDIRECTMUSICPORT iface) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p): stub\n", This);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_GetCaps (LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS pPortCaps) HRESULT WINAPI IDirectMusicPortImpl_GetCaps (LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS pPortCaps) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %p)\n", This, pPortCaps); TRACE("(%p, %p)\n", This, pPortCaps);
pPortCaps = This->pCaps; pPortCaps = This->pCaps;
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_DeviceIoControl (LPDIRECTMUSICPORT iface, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped) HRESULT WINAPI IDirectMusicPortImpl_DeviceIoControl (LPDIRECTMUSICPORT iface, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %ld, %p, %ld, %p, %ld, %p, %p): stub\n", This, dwIoControlCode, lpInBuffer, nInBufferSize, lpOutBuffer, nOutBufferSize, lpBytesReturned, lpOverlapped); FIXME("(%p, %ld, %p, %ld, %p, %ld, %p, %p): stub\n", This, dwIoControlCode, lpInBuffer, nInBufferSize, lpOutBuffer, nOutBufferSize, lpBytesReturned, lpOverlapped);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_SetNumChannelGroups (LPDIRECTMUSICPORT iface, DWORD dwChannelGroups) HRESULT WINAPI IDirectMusicPortImpl_SetNumChannelGroups (LPDIRECTMUSICPORT iface, DWORD dwChannelGroups) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %ld): semi-stub\n", This, dwChannelGroups); FIXME("(%p, %ld): semi-stub\n", This, dwChannelGroups);
This->nrofgroups = dwChannelGroups; This->nrofgroups = dwChannelGroups;
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_GetNumChannelGroups (LPDIRECTMUSICPORT iface, LPDWORD pdwChannelGroups) HRESULT WINAPI IDirectMusicPortImpl_GetNumChannelGroups (LPDIRECTMUSICPORT iface, LPDWORD pdwChannelGroups) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %p)\n", This, pdwChannelGroups); TRACE("(%p, %p)\n", This, pdwChannelGroups);
*pdwChannelGroups = This->nrofgroups; *pdwChannelGroups = This->nrofgroups;
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_Activate (LPDIRECTMUSICPORT iface, BOOL fActive) HRESULT WINAPI IDirectMusicPortImpl_Activate (LPDIRECTMUSICPORT iface, BOOL fActive) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %d)\n", This, fActive); TRACE("(%p, %d)\n", This, fActive);
This->fActive = fActive; This->fActive = fActive;
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_SetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) HRESULT WINAPI IDirectMusicPortImpl_SetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %ld, %ld, %ld): semi-stub\n", This, dwChannelGroup, dwChannel, dwPriority); FIXME("(%p, %ld, %ld, %ld): semi-stub\n", This, dwChannelGroup, dwChannel, dwPriority);
if (dwChannel > 16) {
if (dwChannel > 16)
{
WARN("isn't there supposed to be 16 channels (no. %ld requested)?! (faking as it is ok)\n", dwChannel); WARN("isn't there supposed to be 16 channels (no. %ld requested)?! (faking as it is ok)\n", dwChannel);
/*return E_INVALIDARG;*/ /*return E_INVALIDARG;*/
} }
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_GetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) HRESULT WINAPI IDirectMusicPortImpl_GetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %ld, %ld, %p)\n", This, dwChannelGroup, dwChannel, pdwPriority); TRACE("(%p, %ld, %ld, %p)\n", This, dwChannelGroup, dwChannel, pdwPriority);
*pdwPriority = This->group[dwChannelGroup-1].channel[dwChannel].priority; *pdwPriority = This->group[dwChannelGroup-1].channel[dwChannel].priority;
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_SetDirectSound (LPDIRECTMUSICPORT iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) HRESULT WINAPI IDirectMusicPortImpl_SetDirectSound (LPDIRECTMUSICPORT iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pDirectSound, pDirectSoundBuffer); FIXME("(%p, %p, %p): stub\n", This, pDirectSound, pDirectSoundBuffer);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortImpl_GetFormat (LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize) HRESULT WINAPI IDirectMusicPortImpl_GetFormat (LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize) {
{
ICOM_THIS(IDirectMusicPortImpl,iface); ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p, %p, %p): stub\n", This, pWaveFormatEx, pdwWaveFormatExSize, pdwBufferSize); FIXME("(%p, %p, %p, %p): stub\n", This, pWaveFormatEx, pdwWaveFormatExSize, pdwBufferSize);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl = ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicPortImpl_QueryInterface, IDirectMusicPortImpl_QueryInterface,
IDirectMusicPortImpl_AddRef, IDirectMusicPortImpl_AddRef,
...@@ -233,6 +176,7 @@ ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl = ...@@ -233,6 +176,7 @@ ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl =
IDirectMusicPortImpl_UnloadInstrument, IDirectMusicPortImpl_UnloadInstrument,
IDirectMusicPortImpl_GetLatencyClock, IDirectMusicPortImpl_GetLatencyClock,
IDirectMusicPortImpl_GetRunningStats, IDirectMusicPortImpl_GetRunningStats,
IDirectMusicPortImpl_Compact,
IDirectMusicPortImpl_GetCaps, IDirectMusicPortImpl_GetCaps,
IDirectMusicPortImpl_DeviceIoControl, IDirectMusicPortImpl_DeviceIoControl,
IDirectMusicPortImpl_SetNumChannelGroups, IDirectMusicPortImpl_SetNumChannelGroups,
...@@ -243,16 +187,3 @@ ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl = ...@@ -243,16 +187,3 @@ ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl =
IDirectMusicPortImpl_SetDirectSound, IDirectMusicPortImpl_SetDirectSound,
IDirectMusicPortImpl_GetFormat IDirectMusicPortImpl_GetFormat
}; };
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicPort (LPCGUID lpcGUID, LPDIRECTMUSICPORT* ppDMPort, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicPort))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* IDirectMusicPortDownloadImpl Implementation /* IDirectMusicPortDownloadImpl Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,21 +17,12 @@ ...@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h" #include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicPortDownload IUnknown parts follow: */ /* IDirectMusicPortDownload IUnknown parts follow: */
HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusicPortDownloadImpl,iface); ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPortDownload)) { if (IsEqualIID (riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPortDownload)) {
...@@ -39,20 +30,17 @@ HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOW ...@@ -39,20 +30,17 @@ HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOW
*ppobj = This; *ppobj = This;
return S_OK; return S_OK;
} }
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicPortDownloadImpl_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface) ULONG WINAPI IDirectMusicPortDownloadImpl_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface) {
{
ICOM_THIS(IDirectMusicPortDownloadImpl,iface); ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD iface) ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD iface) {
{
ICOM_THIS(IDirectMusicPortDownloadImpl,iface); ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -63,62 +51,43 @@ ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD ifa ...@@ -63,62 +51,43 @@ ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD ifa
} }
/* IDirectMusicPortDownload Interface follow: */ /* IDirectMusicPortDownload Interface follow: */
HRESULT WINAPI IDirectMusicPortDownloadImpl_GetBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwDLId, IDirectMusicDownload** ppIDMDownload) HRESULT WINAPI IDirectMusicPortDownloadImpl_GetBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwDLId, IDirectMusicDownload** ppIDMDownload) {
{
ICOM_THIS(IDirectMusicPortDownloadImpl,iface); ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwDLId, ppIDMDownload); FIXME("(%p, %ld, %p): stub\n", This, dwDLId, ppIDMDownload);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortDownloadImpl_AllocateBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwSize, IDirectMusicDownload** ppIDMDownload) HRESULT WINAPI IDirectMusicPortDownloadImpl_AllocateBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwSize, IDirectMusicDownload** ppIDMDownload) {
{
ICOM_THIS(IDirectMusicPortDownloadImpl,iface); ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwSize, ppIDMDownload); FIXME("(%p, %ld, %p): stub\n", This, dwSize, ppIDMDownload);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortDownloadImpl_GetDLId (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwStartDLId, DWORD dwCount) HRESULT WINAPI IDirectMusicPortDownloadImpl_GetDLId (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwStartDLId, DWORD dwCount) {
{
ICOM_THIS(IDirectMusicPortDownloadImpl,iface); ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %p, %ld): stub\n", This, pdwStartDLId, dwCount); FIXME("(%p, %p, %ld): stub\n", This, pdwStartDLId, dwCount);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortDownloadImpl_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwAppend) HRESULT WINAPI IDirectMusicPortDownloadImpl_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwAppend) {
{
ICOM_THIS(IDirectMusicPortDownloadImpl,iface); ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %p): stub\n", This, pdwAppend); FIXME("(%p, %p): stub\n", This, pdwAppend);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortDownloadImpl_Download (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload) HRESULT WINAPI IDirectMusicPortDownloadImpl_Download (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload) {
{
ICOM_THIS(IDirectMusicPortDownloadImpl,iface); ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %p): stub\n", This, pIDMDownload); FIXME("(%p, %p): stub\n", This, pIDMDownload);
return S_OK; return S_OK;
} }
HRESULT WINAPI IDirectMusicPortDownloadImpl_Unload (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload) HRESULT WINAPI IDirectMusicPortDownloadImpl_Unload (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload) {
{
ICOM_THIS(IDirectMusicPortDownloadImpl,iface); ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %p): stub\n", This, pIDMDownload); FIXME("(%p, %p): stub\n", This, pIDMDownload);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusicPortDownload) DirectMusicPortDownload_Vtbl = ICOM_VTABLE(IDirectMusicPortDownload) DirectMusicPortDownload_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicPortDownloadImpl_QueryInterface, IDirectMusicPortDownloadImpl_QueryInterface,
IDirectMusicPortDownloadImpl_AddRef, IDirectMusicPortDownloadImpl_AddRef,
...@@ -130,16 +99,3 @@ ICOM_VTABLE(IDirectMusicPortDownload) DirectMusicPortDownload_Vtbl = ...@@ -130,16 +99,3 @@ ICOM_VTABLE(IDirectMusicPortDownload) DirectMusicPortDownload_Vtbl =
IDirectMusicPortDownloadImpl_Download, IDirectMusicPortDownloadImpl_Download,
IDirectMusicPortDownloadImpl_Unload IDirectMusicPortDownloadImpl_Unload
}; };
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicPortDownload (LPCGUID lpcGUID, LPDIRECTMUSICPORTDOWNLOAD* ppDMPortDL, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicPortDownload))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
...@@ -18,21 +18,7 @@ ...@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include "dmusic_private.h"
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmusic); ...@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/*********************************************************************** /***********************************************************************
* interface for self-registering * interface for self-registering
*/ */
struct regsvr_interface struct regsvr_interface {
{
IID const *iid; /* NULL for end of list */ IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */ IID const *base_iid; /* can be NULL to omit */
...@@ -57,8 +42,7 @@ struct regsvr_interface ...@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list); static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list); static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass struct regsvr_coclass {
{
CLSID const *clsid; /* NULL for end of list */ CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */ LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */ LPCSTR ips; /* can be NULL to omit */
...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); ...@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/*********************************************************************** /***********************************************************************
* register_interfaces * register_interfaces
*/ */
static HRESULT register_interfaces(struct regsvr_interface const *list) static HRESULT register_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -194,8 +177,7 @@ error_return: ...@@ -194,8 +177,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_interfaces * unregister_interfaces
*/ */
static HRESULT unregister_interfaces(struct regsvr_interface const *list) static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY interface_key; HKEY interface_key;
...@@ -219,8 +201,7 @@ error_return: ...@@ -219,8 +201,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* register_coclasses * register_coclasses
*/ */
static HRESULT register_coclasses(struct regsvr_coclass const *list) static HRESULT register_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -301,8 +282,7 @@ error_return: ...@@ -301,8 +282,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* unregister_coclasses * unregister_coclasses
*/ */
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
{
LONG res = ERROR_SUCCESS; LONG res = ERROR_SUCCESS;
HKEY coclass_key; HKEY coclass_key;
...@@ -338,8 +318,7 @@ error_return: ...@@ -338,8 +318,7 @@ error_return:
/*********************************************************************** /***********************************************************************
* regsvr_key_guid * regsvr_key_guid
*/ */
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
{
WCHAR buf[39]; WCHAR buf[39];
StringFromGUID2(guid, buf, 39); StringFromGUID2(guid, buf, 39);
...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) ...@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW( static LONG register_key_defvalueW(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
WCHAR const *value) WCHAR const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW( ...@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA( static LONG register_key_defvalueA(
HKEY base, HKEY base,
WCHAR const *name, WCHAR const *name,
char const *value) char const *value) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -394,8 +371,7 @@ static LONG register_progid( ...@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid, char const *progid,
char const *curver_progid, char const *curver_progid,
char const *name, char const *name,
char const *extra) char const *extra) {
{
LONG res; LONG res;
HKEY progid_key; HKEY progid_key;
...@@ -439,8 +415,7 @@ error_close_progid_key: ...@@ -439,8 +415,7 @@ error_close_progid_key:
/*********************************************************************** /***********************************************************************
* recursive_delete_key * recursive_delete_key
*/ */
static LONG recursive_delete_key(HKEY key) static LONG recursive_delete_key(HKEY key) {
{
LONG res; LONG res;
WCHAR subkey_name[MAX_PATH]; WCHAR subkey_name[MAX_PATH];
DWORD cName; DWORD cName;
...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key) ...@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyA * recursive_delete_keyA
*/ */
static LONG recursive_delete_keyA(HKEY base, char const *name) static LONG recursive_delete_keyA(HKEY base, char const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name) ...@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/*********************************************************************** /***********************************************************************
* recursive_delete_keyW * recursive_delete_keyW
*/ */
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
{
LONG res; LONG res;
HKEY key; HKEY key;
...@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = { ...@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = {
/*********************************************************************** /***********************************************************************
* DllRegisterServer (DMUSIC.3) * DllRegisterServer (DMUSIC.3)
*/ */
HRESULT WINAPI DMUSIC_DllRegisterServer(void) HRESULT WINAPI DMUSIC_DllRegisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
...@@ -549,8 +521,7 @@ HRESULT WINAPI DMUSIC_DllRegisterServer(void) ...@@ -549,8 +521,7 @@ HRESULT WINAPI DMUSIC_DllRegisterServer(void)
/*********************************************************************** /***********************************************************************
* DllUnregisterServer (DMUSIC.4) * DllUnregisterServer (DMUSIC.4)
*/ */
HRESULT WINAPI DMUSIC_DllUnregisterServer(void) HRESULT WINAPI DMUSIC_DllUnregisterServer(void) {
{
HRESULT hr; HRESULT hr;
TRACE("\n"); TRACE("\n");
......
/* IDirectMusicThru Implementation /* IDirectMusicThru Implementation
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -17,21 +17,12 @@ ...@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h" #include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicThru IUnknown parts follow: */ /* IDirectMusicThru IUnknown parts follow: */
HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ppobj) HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ppobj) {
{
ICOM_THIS(IDirectMusicThruImpl,iface); ICOM_THIS(IDirectMusicThruImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || if (IsEqualIID (riid, &IID_IUnknown) ||
...@@ -40,20 +31,17 @@ HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REF ...@@ -40,20 +31,17 @@ HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REF
*ppobj = This; *ppobj = This;
return S_OK; return S_OK;
} }
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj); WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE; return E_NOINTERFACE;
} }
ULONG WINAPI IDirectMusicThruImpl_AddRef (LPDIRECTMUSICTHRU iface) ULONG WINAPI IDirectMusicThruImpl_AddRef (LPDIRECTMUSICTHRU iface) {
{
ICOM_THIS(IDirectMusicThruImpl,iface); ICOM_THIS(IDirectMusicThruImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref); TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref); return ++(This->ref);
} }
ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface) ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface) {
{
ICOM_THIS(IDirectMusicThruImpl,iface); ICOM_THIS(IDirectMusicThruImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
...@@ -64,33 +52,16 @@ ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface) ...@@ -64,33 +52,16 @@ ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface)
} }
/* IDirectMusicThru Interface follow: */ /* IDirectMusicThru Interface follow: */
HRESULT WINAPI IDirectMusicThruImpl_ThruChannel (LPDIRECTMUSICTHRU iface, DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort) HRESULT WINAPI IDirectMusicThruImpl_ThruChannel (LPDIRECTMUSICTHRU iface, DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort) {
{
ICOM_THIS(IDirectMusicThruImpl,iface); ICOM_THIS(IDirectMusicThruImpl,iface);
FIXME("(%p, %ld, %ld, %ld, %ld, %p): stub\n", This, dwSourceChannelGroup, dwSourceChannel, dwDestinationChannelGroup, dwDestinationChannel, pDestinationPort); FIXME("(%p, %ld, %ld, %ld, %ld, %p): stub\n", This, dwSourceChannelGroup, dwSourceChannel, dwDestinationChannelGroup, dwDestinationChannel, pDestinationPort);
return S_OK; return S_OK;
} }
ICOM_VTABLE(IDirectMusicThru) DirectMusicThru_Vtbl = ICOM_VTABLE(IDirectMusicThru) DirectMusicThru_Vtbl = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicThruImpl_QueryInterface, IDirectMusicThruImpl_QueryInterface,
IDirectMusicThruImpl_AddRef, IDirectMusicThruImpl_AddRef,
IDirectMusicThruImpl_Release, IDirectMusicThruImpl_Release,
IDirectMusicThruImpl_ThruChannel IDirectMusicThruImpl_ThruChannel
}; };
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicThru (LPCGUID lpcGUID, LPDIRECTMUSICTHRU* ppDMThru, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicThru))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* /*
* Copyright 2001 Ove Kaaven * Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
#define WINE_OLESELFREGISTER #define WINE_OLESELFREGISTER
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic" #define WINE_FILEDESCRIPTION_STR "Wine DirectMusic"
#define WINE_FILENAME_STR "dmusic.dll" #define WINE_FILENAME_STR "dmusic.dll"
#define WINE_FILEVERSION 4,8,1,881 #define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.8.1.881" #define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,8,1,881 #define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.8" #define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX" #define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
/* DirectMusic32 Main /* DirectMusic32 Main
* *
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -20,11 +20,21 @@ ...@@ -20,11 +20,21 @@
#include <stdarg.h> #include <stdarg.h>
#include "windef.h" #include "windef.h"
#include "wine/debug.h"
#include "winbase.h" #include "winbase.h"
#include "winnt.h" #include "winnt.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "winreg.h"
#include "dmusici.h"
#include "dmusicf.h"
#include "dmusics.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmusic32);
HRESULT WINAPI DMUSIC32_CreateCDirectMusicEmulatePort (LPVOID ptr1, LPVOID ptr2, LPVOID ptr3) HRESULT WINAPI DMUSIC32_CreateCDirectMusicEmulatePort (LPVOID ptr1, LPVOID ptr2, LPVOID ptr3)
{ {
......
/* /*
* Copyright (C) 2003 Rok Mandeljc * Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Legacy Port" #define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Legacy Port"
#define WINE_FILENAME_STR "dmusic32.dll" #define WINE_FILENAME_STR "dmusic32.dll"
#define WINE_FILEVERSION 4,8,1,881 #define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.8.1.881" #define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,8,1,881 #define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.8" #define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX" #define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc" #include "wine/wine_common_ver.rc"
Makefile
dswave.dll.dbg.c
dswave.spec.c
dswave.spec.def
version.res
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = dswave.dll
IMPORTS = msacm32 ole32 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID)
C_SRCS = \
dswave.c \
dswave_main.c \
regsvr.c
RC_SRCS = version.rc
@MAKE_DLL_RULES@
### Dependencies:
@ stdcall -private DllCanUnloadNow() DSWAVE_DllCanUnloadNow
@ stdcall -private DllGetClassObject(ptr ptr ptr) DSWAVE_DllGetClassObject
@ stdcall -private DllRegisterServer() DSWAVE_DllRegisterServer
@ stdcall -private DllUnregisterServer() DSWAVE_DllUnregisterServer
/* DirectMusic Wave Main
*
* Copyright (C) 2003-2004 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 "dswave_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dswave);
typedef struct {
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
/******************************************************************
* DirectMusicWave ClassFactory
*/
static HRESULT WINAPI WaveCF_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 WaveCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI WaveCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI WaveCF_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);
return DMUSIC_CreateDirectMusicWaveImpl (riid, ppobj, pOuter);
}
static HRESULT WINAPI WaveCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) WaveCF_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WaveCF_QueryInterface,
WaveCF_AddRef,
WaveCF_Release,
WaveCF_CreateInstance,
WaveCF_LockServer
};
static IClassFactoryImpl Wave_CF = {&WaveCF_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 (DSWAVE.1)
*
*
*/
HRESULT WINAPI DSWAVE_DllCanUnloadNow(void) {
FIXME("(void): stub\n");
return S_FALSE;
}
/******************************************************************
* DllGetClassObject (DSWAVE.2)
*
*
*/
HRESULT WINAPI DSWAVE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectSoundWave) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &Wave_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;
}
/* DirectMusic Wave Private Include
*
* Copyright (C) 2003-2004 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_DSWAVE_PRIVATE_H
#define __WINE_DSWAVE_PRIVATE_H
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "winreg.h"
#include "dmusici.h"
#include "dmusicf.h"
#include "dmusics.h"
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicWaveImpl IDirectMusicWaveImpl;
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(IUnknown) DirectMusicWave_Unknown_Vtbl;
extern ICOM_VTABLE(IDirectMusicObject) DirectMusicWave_Object_Vtbl;
extern ICOM_VTABLE(IPersistStream) DirectMusicWave_PersistStream_Vtbl;
/*****************************************************************************
* ClassFactory
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectMusicWaveImpl implementation structure
*/
struct IDirectMusicWaveImpl {
/* IUnknown fields */
ICOM_VTABLE(IUnknown) *UnknownVtbl;
ICOM_VTABLE(IDirectMusicObject) *ObjectVtbl;
ICOM_VTABLE(IPersistStream) *PersistStreamVtbl;
DWORD ref;
/* IDirectMusicWaveImpl fields */
LPDMUS_OBJECTDESC pDesc;
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicWaveImpl_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicWaveImpl_IUnknown_AddRef (LPUNKNOWN iface);
extern ULONG WINAPI IDirectMusicWaveImpl_IUnknown_Release (LPUNKNOWN iface);
/* IDirectMusicObject: */
extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_QueryInterface (LPDIRECTMUSICOBJECT iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicWaveImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface);
extern ULONG WINAPI IDirectMusicWaveImpl_IDirectMusicObject_Release (LPDIRECTMUSICOBJECT iface);
extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_GetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_SetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_ParseDescriptor (LPDIRECTMUSICOBJECT iface, LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc);
/* IPersistStream: */
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject);
extern ULONG WINAPI IDirectMusicWaveImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface);
extern ULONG WINAPI IDirectMusicWaveImpl_IPersistStream_Release (LPPERSISTSTREAM iface);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_IsDirty (LPPERSISTSTREAM iface);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_Load (LPPERSISTSTREAM iface, IStream* pStm);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
/*****************************************************************************
* Misc.
*/
/* for simpler reading */
typedef struct _DMUS_PRIVATE_CHUNK {
FOURCC fccID; /* FOURCC ID of the chunk */
DWORD dwSize; /* size of the chunk */
} DMUS_PRIVATE_CHUNK, *LPDMUS_PRIVATE_CHUNK;
/* check whether the given DWORD is even (return 0) or odd (return 1) */
static inline int even_or_odd (DWORD number) {
return (number & 0x1); /* basically, check if bit 0 is set ;) */
}
/* FOURCC to string conversion for debug messages */
static inline const char *debugstr_fourcc (DWORD fourcc) {
if (!fourcc) return "'null'";
return wine_dbg_sprintf ("\'%c%c%c%c\'",
(char)(fourcc), (char)(fourcc >> 8),
(char)(fourcc >> 16), (char)(fourcc >> 24));
}
/* DMUS_VERSION struct to string conversion for debug messages */
static inline const char *debugstr_dmversion (LPDMUS_VERSION version) {
if (!version) return "'null'";
return wine_dbg_sprintf ("\'%i,%i,%i,%i\'",
(int)((version->dwVersionMS && 0xFFFF0000) >> 8), (int)(version->dwVersionMS && 0x0000FFFF),
(int)((version->dwVersionLS && 0xFFFF0000) >> 8), (int)(version->dwVersionLS && 0x0000FFFF));
}
/* used for initialising structs (primarily for DMUS_OBJECTDESC) */
#define DM_STRUCT_INIT(x) \
do { \
memset((x), 0, sizeof(*(x))); \
(x)->dwSize = sizeof(*x); \
} while (0)
/* used for generic dumping (copied from ddraw) */
typedef struct {
DWORD val;
const char* name;
} flag_info;
#define FE(x) { x, #x }
#define DMUSIC_dump_flags(flags,names,num_names) DMUSIC_dump_flags_(flags, names, num_names, 1)
/* generic dump function */
static inline void DMUSIC_dump_flags_ (DWORD flags, const flag_info* names, size_t num_names, int newline) {
unsigned int i;
for (i=0; i < num_names; i++) {
if ((flags & names[i].val) || /* standard flag value */
((!flags) && (!names[i].val))) /* zero value only */
DPRINTF("%s ", names[i].name);
}
if (newline) DPRINTF("\n");
}
static inline void DMUSIC_dump_DMUS_OBJ_FLAGS (DWORD flagmask) {
static const flag_info flags[] = {
FE(DMUS_OBJ_OBJECT),
FE(DMUS_OBJ_CLASS),
FE(DMUS_OBJ_NAME),
FE(DMUS_OBJ_CATEGORY),
FE(DMUS_OBJ_FILENAME),
FE(DMUS_OBJ_FULLPATH),
FE(DMUS_OBJ_URL),
FE(DMUS_OBJ_VERSION),
FE(DMUS_OBJ_DATE),
FE(DMUS_OBJ_LOADED),
FE(DMUS_OBJ_MEMORY),
FE(DMUS_OBJ_STREAM)
};
DMUSIC_dump_flags(flagmask, flags, sizeof(flags)/sizeof(flags[0]));
}
static inline void DMUSIC_dump_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) {
if (pDesc) {
DPRINTF("DMUS_OBJECTDESC (%p)\n", pDesc);
DPRINTF(" - dwSize = %ld\n", pDesc->dwSize);
DPRINTF(" - dwValidData = ");
DMUSIC_dump_DMUS_OBJ_FLAGS (pDesc->dwValidData);
if (pDesc->dwValidData & DMUS_OBJ_CLASS) DPRINTF(" - guidClass = %s\n", debugstr_guid(&pDesc->guidClass));
if (pDesc->dwValidData & DMUS_OBJ_OBJECT) DPRINTF(" - guidObject = %s\n", debugstr_guid(&pDesc->guidObject));
if (pDesc->dwValidData & DMUS_OBJ_DATE) DPRINTF(" - ftDate = FIXME\n");
if (pDesc->dwValidData & DMUS_OBJ_VERSION) DPRINTF(" - vVersion = %s\n", debugstr_dmversion(&pDesc->vVersion));
if (pDesc->dwValidData & DMUS_OBJ_NAME) DPRINTF(" - wszName = %s\n", debugstr_w(pDesc->wszName));
if (pDesc->dwValidData & DMUS_OBJ_CATEGORY) DPRINTF(" - wszCategory = %s\n", debugstr_w(pDesc->wszCategory));
if (pDesc->dwValidData & DMUS_OBJ_FILENAME) DPRINTF(" - wszFileName = %s\n", debugstr_w(pDesc->wszFileName));
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) DPRINTF(" - llMemLength = %lli\n - pbMemData = %p\n", pDesc->llMemLength, pDesc->pbMemData);
if (pDesc->dwValidData & DMUS_OBJ_STREAM) DPRINTF(" - pStream = %p\n", pDesc->pStream);
} else {
DPRINTF("(NULL)\n");
}
}
#endif /* __WINE_DSWAVE_PRIVATE_H */
/*
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define WINE_OLESELFREGISTER
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Wave"
#define WINE_FILENAME_STR "dswave.dll"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
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