Commit 40a4a5c7 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmusic: Fail in CreatePort() if SetDirectSound() wasn't called.

parent 14f89931
......@@ -129,14 +129,14 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort(LPDIRECTMUSIC8 iface, REFCLSI
TRACE("(%p)->(%s, %p, %p, %p)\n", This, debugstr_dmguid(rclsid_port), port_params, port, unkouter);
if (!rclsid_port)
if (!rclsid_port || !port)
return E_POINTER;
if (!port_params)
return E_INVALIDARG;
if (!port)
return E_POINTER;
if (unkouter)
return CLASS_E_NOAGGREGATION;
if (!This->dsound)
return DMUS_E_DSOUND_NOT_SET;
if (TRACE_ON(dmusic))
dump_DMUS_PORTPARAMS(port_params);
......
......@@ -68,7 +68,7 @@ static void test_dmusic(void)
/* No port can be created before SetDirectSound is called */
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, &port, NULL);
todo_wine ok(hr == DMUS_E_DSOUND_NOT_SET, "IDirectMusic_CreatePort returned: %x\n", hr);
ok(hr == DMUS_E_DSOUND_NOT_SET, "IDirectMusic_CreatePort returned: %x\n", hr);
hr = IDirectMusic_SetDirectSound(dmusic, NULL, NULL);
ok(hr == S_OK, "IDirectMusic_SetDirectSound returned: %x\n", hr);
......
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