diff --git a/dlls/dmstyle/auditiontrack.c b/dlls/dmstyle/auditiontrack.c index 3d6afc15679..4e14db097bd 100644 --- a/dlls/dmstyle/auditiontrack.c +++ b/dlls/dmstyle/auditiontrack.c @@ -270,7 +270,8 @@ static const IPersistStreamVtbl DirectMusicAuditionTrack_PersistStream_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicAuditionTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmauditiontrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicAuditionTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicAuditionTrack)); diff --git a/dlls/dmstyle/chordtrack.c b/dlls/dmstyle/chordtrack.c index d85fbdb14f4..5ce3eb1c78d 100644 --- a/dlls/dmstyle/chordtrack.c +++ b/dlls/dmstyle/chordtrack.c @@ -399,7 +399,8 @@ static const IPersistStreamVtbl DirectMusicChordTrack_PersistStream_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicChordTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmchordtrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicChordTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordTrack)); diff --git a/dlls/dmstyle/commandtrack.c b/dlls/dmstyle/commandtrack.c index 9fe0057fd3c..4cf208b488c 100644 --- a/dlls/dmstyle/commandtrack.c +++ b/dlls/dmstyle/commandtrack.c @@ -333,7 +333,8 @@ static const IPersistStreamVtbl DirectMusicCommandTrack_PersistStream_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicCommandTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmcommandtrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicCommandTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicCommandTrack)); diff --git a/dlls/dmstyle/dmstyle_main.c b/dlls/dmstyle/dmstyle_main.c index 677fc1c70ef..996fc9b0a40 100644 --- a/dlls/dmstyle/dmstyle_main.c +++ b/dlls/dmstyle/dmstyle_main.c @@ -27,12 +27,12 @@ LONG DMSTYLE_refCount = 0; typedef struct { IClassFactory IClassFactory_iface; - HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ppv, IUnknown *pUnkOuter); + HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ret_iface); } IClassFactoryImpl; -static HRESULT WINAPI create_direct_music_section(REFIID riid, void **ppv, IUnknown *pUnkOuter) +static HRESULT WINAPI create_direct_music_section(REFIID riid, void **ret_iface) { - FIXME("(%p, %s, %p) stub\n", pUnkOuter, debugstr_dmguid(riid), ppv); + FIXME("(%s, %p) stub\n", debugstr_dmguid(riid), ret_iface); return E_NOINTERFACE; } @@ -86,7 +86,12 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown TRACE ("(%p, %s, %p)\n", pUnkOuter, debugstr_dmguid(riid), ppv); - return This->fnCreateInstance(riid, ppv, pUnkOuter); + if (pUnkOuter) { + *ppv = NULL; + return CLASS_E_NOAGGREGATION; + } + + return This->fnCreateInstance(riid, ppv); } static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) @@ -110,15 +115,13 @@ static const IClassFactoryVtbl classfactory_vtbl = { }; static IClassFactoryImpl Section_CF = {{&classfactory_vtbl}, create_direct_music_section}; -static IClassFactoryImpl Style_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicStyleImpl}; -static IClassFactoryImpl ChordTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicChordTrack}; -static IClassFactoryImpl CommandTrack_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicCommandTrack}; -static IClassFactoryImpl StyleTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicStyleTrack}; -static IClassFactoryImpl MotifTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicMotifTrack}; -static IClassFactoryImpl AuditionTrack_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicAuditionTrack}; -static IClassFactoryImpl MuteTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicMuteTrack}; +static IClassFactoryImpl Style_CF = {{&classfactory_vtbl}, create_dmstyle}; +static IClassFactoryImpl ChordTrack_CF = {{&classfactory_vtbl}, create_dmchordtrack}; +static IClassFactoryImpl CommandTrack_CF = {{&classfactory_vtbl}, create_dmcommandtrack}; +static IClassFactoryImpl StyleTrack_CF = {{&classfactory_vtbl}, create_dmstyletrack}; +static IClassFactoryImpl MotifTrack_CF = {{&classfactory_vtbl}, create_dmmotiftrack}; +static IClassFactoryImpl AuditionTrack_CF = {{&classfactory_vtbl}, create_dmauditiontrack}; +static IClassFactoryImpl MuteTrack_CF = {{&classfactory_vtbl}, create_dmmutetrack}; /****************************************************************** * DllMain diff --git a/dlls/dmstyle/dmstyle_private.h b/dlls/dmstyle/dmstyle_private.h index e1c8e9a7664..7ac9face602 100644 --- a/dlls/dmstyle/dmstyle_private.h +++ b/dlls/dmstyle/dmstyle_private.h @@ -58,7 +58,13 @@ typedef struct IDirectMusicStyleTrack IDirectMusicStyleTrack; /***************************************************************************** * ClassFactory */ -extern HRESULT WINAPI DMUSIC_CreateDirectMusicStyleImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmstyle(REFIID lpcGUID, LPVOID* ppobj) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmauditiontrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmchordtrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmcommandtrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmmotiftrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmmutetrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmstyletrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; /***************************************************************************** * Auxiliary definitions @@ -92,12 +98,6 @@ typedef struct _DMUS_PRIVATE_STYLE_ITEM { IDirectMusicStyle8* pObject; } DMUS_PRIVATE_STYLE_ITEM, *LPDMUS_PRIVATE_STYLE_ITEM; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicAuditionTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicChordTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicCommandTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicMotifTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicMuteTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicStyleTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; /***************************************************************************** * IDirectMusicStyle8Impl implementation structure diff --git a/dlls/dmstyle/motiftrack.c b/dlls/dmstyle/motiftrack.c index 06fdb63c61b..9a25a0501de 100644 --- a/dlls/dmstyle/motiftrack.c +++ b/dlls/dmstyle/motiftrack.c @@ -276,7 +276,8 @@ static const IPersistStreamVtbl DirectMusicMotifTrack_PersistStream_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicMotifTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmmotiftrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicMotifTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMotifTrack)); diff --git a/dlls/dmstyle/mutetrack.c b/dlls/dmstyle/mutetrack.c index a4d92fa072f..64390f16db4 100644 --- a/dlls/dmstyle/mutetrack.c +++ b/dlls/dmstyle/mutetrack.c @@ -273,7 +273,8 @@ static const IPersistStreamVtbl DirectMusicMuteTrack_PersistStream_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicMuteTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmmutetrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicMuteTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMuteTrack)); diff --git a/dlls/dmstyle/style.c b/dlls/dmstyle/style.c index 36ce9bffdf5..077ed06a635 100644 --- a/dlls/dmstyle/style.c +++ b/dlls/dmstyle/style.c @@ -1086,7 +1086,8 @@ static const IPersistStreamVtbl DirectMusicStyle8_PersistStream_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicStyleImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmstyle(REFIID lpcGUID, void **ppobj) +{ IDirectMusicStyle8Impl* obj; obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicStyle8Impl)); diff --git a/dlls/dmstyle/styletrack.c b/dlls/dmstyle/styletrack.c index fd100e48f52..39e5a706f65 100644 --- a/dlls/dmstyle/styletrack.c +++ b/dlls/dmstyle/styletrack.c @@ -462,7 +462,8 @@ static const IPersistStreamVtbl DirectMusicStyleTrack_PersistStream_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicStyleTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmstyletrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicStyleTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicStyleTrack));