From ceb87f98a236bb82b5e3ac2841b351df24d4ec34 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 22 Dec 2008 13:40:58 +0100 Subject: [PATCH] dmusic: Improve IDirectMusicPortImpl_DownloadInstrument stub. --- dlls/dmusic/port.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c index 7773d2873e2..5264f58636f 100644 --- a/dlls/dmusic/port.c +++ b/dlls/dmusic/port.c @@ -88,8 +88,13 @@ static HRESULT WINAPI IDirectMusicPortImpl_Read (LPDIRECTMUSICPORT iface, LPDIRE static HRESULT WINAPI IDirectMusicPortImpl_DownloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicInstrument* pInstrument, IDirectMusicDownloadedInstrument** ppDownloadedInstrument, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges) { IDirectMusicPortImpl *This = (IDirectMusicPortImpl *)iface; + FIXME("(%p, %p, %p, %p, %d): stub\n", This, pInstrument, ppDownloadedInstrument, pNoteRanges, dwNumNoteRanges); - return S_OK; + + if (!pInstrument || !ppDownloadedInstrument || (dwNumNoteRanges && !pNoteRanges)) + return E_POINTER; + + return DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(&IID_IDirectMusicDownloadedInstrument, (LPVOID*)ppDownloadedInstrument, NULL); } static HRESULT WINAPI IDirectMusicPortImpl_UnloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *pDownloadedInstrument) {