Commit 5b27cdf9 authored by Austin Lund's avatar Austin Lund Committed by Alexandre Julliard

dmime: Ensure IDirectMusicPort is initialised when calling IDirectMusicPerformance::PChannelInfo.

parent 203272ea
......@@ -588,7 +588,16 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannel (LPDIRECTMUSIC
static HRESULT WINAPI IDirectMusicPerformance8Impl_PChannelInfo (LPDIRECTMUSICPERFORMANCE8 iface, DWORD dwPChannel, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel) {
IDirectMusicPerformance8Impl *This = (IDirectMusicPerformance8Impl *)iface;
DMUS_PORTPARAMS8 dmusportparams;
GUID def;
FIXME("(%p, %d, %p, %p, %p): stub\n", This, dwPChannel, ppPort, pdwGroup, pdwMChannel);
dmusportparams.dwSize = sizeof(DMUS_PORTPARAMS8);
dmusportparams.dwValidParams = 0;
IDirectMusic8_GetDefaultPort(This->pDirectMusic, &def);
IDirectMusic8_CreatePort(This->pDirectMusic, &def, &dmusportparams, ppPort, NULL);
return S_OK;
}
......
......@@ -45,7 +45,7 @@ static void test_PChannelInfo(void)
pDirectMusicPort = NULL;
hr = IDirectMusicPerformance8_PChannelInfo(idmusicperformance, 0, &pDirectMusicPort, NULL, NULL);
ok(hr == S_OK, "Failed to call PChannelInfo (%x)\n", hr);
todo_wine ok(pDirectMusicPort != NULL, "IDirectMusicPort not set\n");
ok(pDirectMusicPort != NULL, "IDirectMusicPort not set\n");
if (hr == S_OK && pDirectMusicPort != NULL)
IDirectMusicPort_Release(pDirectMusicPort);
}
......
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