Commit f6484780 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmime/tests: Build without -DWINE_NO_LONG_TYPES.

parent e4f91115
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmime.dll
IMPORTS = user32 ole32 dsound
......
......@@ -57,8 +57,7 @@ static void test_COM_audiopath(void)
hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicPerformance8, (void**)&performance);
ok(hr == S_OK || broken(hr == E_NOINTERFACE),
"DirectMusicPerformance create failed: %08x\n", hr);
ok(hr == S_OK || broken(hr == E_NOINTERFACE), "DirectMusicPerformance create failed: %#lx\n", hr);
if (!performance) {
win_skip("IDirectMusicPerformance8 not available\n");
return;
......@@ -67,67 +66,67 @@ static void test_COM_audiopath(void)
DMUS_APATH_SHARED_STEREOPLUSREVERB, 64, DMUS_AUDIOF_ALL, NULL);
ok(hr == S_OK || hr == DSERR_NODRIVER ||
broken(hr == AUDCLNT_E_ENDPOINT_CREATE_FAILED), /* Win 10 testbot */
"DirectMusicPerformance_InitAudio failed: %08x\n", hr);
"DirectMusicPerformance_InitAudio failed: %#lx\n", hr);
if (FAILED(hr)) {
skip("Audio failed to initialize\n");
return;
}
hr = IDirectMusicPerformance8_GetDefaultAudioPath(performance, &dmap);
ok(hr == S_OK, "DirectMusicPerformance_GetDefaultAudioPath failed: %08x\n", hr);
ok(hr == S_OK, "DirectMusicPerformance_GetDefaultAudioPath failed: %#lx\n", hr);
/* IDirectMusicObject and IPersistStream are not supported */
hr = IDirectMusicAudioPath_QueryInterface(dmap, &IID_IDirectMusicObject, (void**)&unk);
todo_wine ok(FAILED(hr) && !unk, "Unexpected IDirectMusicObject interface: hr=%08x, iface=%p\n",
todo_wine ok(FAILED(hr) && !unk, "Unexpected IDirectMusicObject interface: hr=%#lx, iface=%p\n",
hr, unk);
if (unk) IUnknown_Release(unk);
hr = IDirectMusicAudioPath_QueryInterface(dmap, &IID_IPersistStream, (void**)&unk);
todo_wine ok(FAILED(hr) && !unk, "Unexpected IPersistStream interface: hr=%08x, iface=%p\n",
todo_wine ok(FAILED(hr) && !unk, "Unexpected IPersistStream interface: hr=%#lx, iface=%p\n",
hr, unk);
if (unk) IUnknown_Release(unk);
/* Same refcount for all DirectMusicAudioPath interfaces */
refcount = IDirectMusicAudioPath_AddRef(dmap);
ok(refcount == 3, "refcount == %u, expected 3\n", refcount);
ok(refcount == 3, "refcount == %lu, expected 3\n", refcount);
hr = IDirectMusicAudioPath_QueryInterface(dmap, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
ok(unk == (IUnknown*)dmap, "got %p, %p\n", unk, dmap);
refcount = IUnknown_AddRef(unk);
ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
hr = IDirectMusicAudioPath_GetObjectInPath(dmap, DMUS_PCHANNEL_ALL, DMUS_PATH_BUFFER, buffer, &GUID_NULL,
0, &IID_IDirectSoundBuffer, (void**)&dsound);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
IDirectSoundBuffer_Release(dsound);
hr = IDirectMusicAudioPath_GetObjectInPath(dmap, DMUS_PCHANNEL_ALL, DMUS_PATH_BUFFER, buffer, &GUID_NULL,
0, &IID_IDirectSoundBuffer8, (void**)&dsound8);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
IDirectSoundBuffer8_Release(dsound8);
hr = IDirectMusicAudioPath_GetObjectInPath(dmap, DMUS_PCHANNEL_ALL, DMUS_PATH_BUFFER, buffer, &GUID_NULL,
0, &IID_IDirectSoundNotify, (void**)&notify);
ok(hr == E_NOINTERFACE, "Failed: %08x\n", hr);
ok(hr == E_NOINTERFACE, "Failed: %#lx\n", hr);
hr = IDirectMusicAudioPath_GetObjectInPath(dmap, DMUS_PCHANNEL_ALL, DMUS_PATH_BUFFER, buffer, &GUID_NULL,
0, &IID_IDirectSound3DBuffer, (void**)&dsound3d);
ok(hr == E_NOINTERFACE, "Failed: %08x\n", hr);
ok(hr == E_NOINTERFACE, "Failed: %#lx\n", hr);
hr = IDirectMusicAudioPath_GetObjectInPath(dmap, DMUS_PCHANNEL_ALL, DMUS_PATH_BUFFER, buffer, &GUID_NULL,
0, &IID_IKsPropertySet, (void**)&propset);
todo_wine ok(hr == S_OK, "Failed: %08x\n", hr);
todo_wine ok(hr == S_OK, "Failed: %#lx\n", hr);
if (propset)
IKsPropertySet_Release(propset);
hr = IDirectMusicAudioPath_GetObjectInPath(dmap, DMUS_PCHANNEL_ALL, DMUS_PATH_BUFFER, buffer, &GUID_NULL,
0, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
IUnknown_Release(unk);
hr = IDirectMusicAudioPath_GetObjectInPath(dmap, DMUS_PCHANNEL_ALL, DMUS_PATH_BUFFER, buffer, &GUID_NULL,
0, &GUID_NULL, (void**)&unk);
ok(hr == E_NOINTERFACE, "Failed: %08x\n", hr);
ok(hr == E_NOINTERFACE, "Failed: %#lx\n", hr);
while (IDirectMusicAudioPath_Release(dmap) > 1); /* performance has a reference too */
IDirectMusicPerformance8_CloseDown(performance);
......@@ -151,44 +150,44 @@ static void test_COM_audiopathconfig(void)
return;
}
ok(hr == CLASS_E_NOAGGREGATION,
"DirectMusicAudioPathConfig create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
"DirectMusicAudioPathConfig create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmap, "dmap = %p\n", dmap);
/* IDirectMusicAudioPath not supported */
hr = CoCreateInstance(&CLSID_DirectMusicAudioPathConfig, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicAudioPath, (void**)&dmap);
todo_wine ok(FAILED(hr) && !dmap,
"Unexpected IDirectMusicAudioPath interface: hr=%08x, iface=%p\n", hr, dmap);
"Unexpected IDirectMusicAudioPath interface: hr=%#lx, iface=%p\n", hr, dmap);
/* IDirectMusicObject and IPersistStream supported */
hr = CoCreateInstance(&CLSID_DirectMusicAudioPathConfig, NULL, CLSCTX_INPROC_SERVER,
&IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "DirectMusicObject create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicObject create failed: %#lx, expected S_OK\n", hr);
IPersistStream_Release(ps);
hr = CoCreateInstance(&CLSID_DirectMusicAudioPathConfig, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmo);
ok(hr == S_OK, "DirectMusicObject create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicObject create failed: %#lx, expected S_OK\n", hr);
/* Same refcount for all DirectMusicObject interfaces */
refcount = IDirectMusicObject_AddRef(dmo);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicObject_QueryInterface(dmo, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IPersistStream_Release(ps);
hr = IDirectMusicObject_QueryInterface(dmo, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
/* IDirectMusicAudioPath still not supported */
hr = IDirectMusicObject_QueryInterface(dmo, &IID_IDirectMusicAudioPath, (void**)&dmap);
todo_wine ok(FAILED(hr) && !dmap,
"Unexpected IDirectMusicAudioPath interface: hr=%08x, iface=%p\n", hr, dmap);
"Unexpected IDirectMusicAudioPath interface: hr=%#lx, iface=%p\n", hr, dmap);
while (IDirectMusicObject_Release(dmo));
}
......@@ -207,41 +206,41 @@ static void test_COM_graph(void)
hr = CoCreateInstance(&CLSID_DirectMusicGraph, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmg);
ok(hr == CLASS_E_NOAGGREGATION,
"DirectMusicGraph create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
"DirectMusicGraph create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmg, "dmg = %p\n", dmg);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory,
(void**)&dmg);
ok(hr == E_NOINTERFACE, "DirectMusicGraph create failed: %08x, expected E_NOINTERFACE\n", hr);
ok(hr == E_NOINTERFACE, "DirectMusicGraph create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicGraph interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicGraph, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicGraph, (void**)&dmg);
ok(hr == S_OK, "DirectMusicGraph create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicGraph create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicGraph_AddRef(dmg);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicGraph_QueryInterface(dmg, &IID_IDirectMusicObject, (void**)&dmo);
if (hr == E_NOINTERFACE) {
win_skip("DirectMusicGraph without IDirectMusicObject\n");
return;
}
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
refcount = IDirectMusicObject_AddRef(dmo);
ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IDirectMusicObject_Release(dmo);
hr = IDirectMusicGraph_QueryInterface(dmg, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IPersistStream_Release(ps);
hr = IDirectMusicGraph_QueryInterface(dmg, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicGraph_Release(dmg));
......@@ -260,14 +259,13 @@ static void test_COM_segment(void)
hr = CoCreateInstance(&CLSID_DirectMusicSegment, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dms);
ok(hr == CLASS_E_NOAGGREGATION,
"DirectMusicSegment create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
"DirectMusicSegment create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dms, "dms = %p\n", dms);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectSound, (void**)&dms);
ok(hr == E_NOINTERFACE,
"DirectMusicSegment create failed: %08x, expected E_NOINTERFACE\n", hr);
ok(hr == E_NOINTERFACE, "DirectMusicSegment create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount */
hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER,
......@@ -276,28 +274,28 @@ static void test_COM_segment(void)
win_skip("DirectMusicSegment without IDirectMusicSegment8\n");
return;
}
ok(hr == S_OK, "DirectMusicSegment create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicSegment create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicSegment8_AddRef(dms);
ok (refcount == 2, "refcount == %u, expected 2\n", refcount);
ok (refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicSegment8_QueryInterface(dms, &IID_IDirectMusicObject, (void**)&dmo);
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
IDirectMusicSegment8_AddRef(dms);
refcount = IDirectMusicSegment8_Release(dms);
ok (refcount == 3, "refcount == %u, expected 3\n", refcount);
ok (refcount == 3, "refcount == %lu, expected 3\n", refcount);
hr = IDirectMusicSegment8_QueryInterface(dms, &IID_IPersistStream, (void**)&stream);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IDirectMusicSegment8_Release(dms);
ok (refcount == 3, "refcount == %u, expected 3\n", refcount);
ok (refcount == 3, "refcount == %lu, expected 3\n", refcount);
hr = IDirectMusicSegment8_QueryInterface(dms, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_Release(unk);
ok (refcount == 3, "refcount == %u, expected 3\n", refcount);
ok (refcount == 3, "refcount == %lu, expected 3\n", refcount);
refcount = IDirectMusicObject_Release(dmo);
ok (refcount == 2, "refcount == %u, expected 2\n", refcount);
ok (refcount == 2, "refcount == %lu, expected 2\n", refcount);
refcount = IPersistStream_Release(stream);
ok (refcount == 1, "refcount == %u, expected 1\n", refcount);
ok (refcount == 1, "refcount == %lu, expected 1\n", refcount);
refcount = IDirectMusicSegment8_Release(dms);
ok (refcount == 0, "refcount == %u, expected 0\n", refcount);
ok (refcount == 0, "refcount == %lu, expected 0\n", refcount);
}
static void test_COM_segmentstate(void)
......@@ -311,14 +309,13 @@ static void test_COM_segmentstate(void)
hr = CoCreateInstance(&CLSID_DirectMusicSegmentState, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmss8);
ok(hr == CLASS_E_NOAGGREGATION,
"DirectMusicSegmentState8 create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
"DirectMusicSegmentState8 create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmss8, "dmss8 = %p\n", dmss8);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicSegmentState, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmss8);
ok(hr == E_NOINTERFACE,
"DirectMusicSegmentState8 create failed: %08x, expected E_NOINTERFACE\n", hr);
ok(hr == E_NOINTERFACE, "DirectMusicSegmentState8 create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicSegmentState interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicSegmentState, NULL, CLSCTX_INPROC_SERVER,
......@@ -327,18 +324,18 @@ static void test_COM_segmentstate(void)
win_skip("DirectMusicSegmentState without IDirectMusicSegmentState8\n");
return;
}
ok(hr == S_OK, "DirectMusicSegmentState8 create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicSegmentState8 create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicSegmentState8_AddRef(dmss8);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicSegmentState8_QueryInterface(dmss8, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IUnknown_Release(unk);
hr = IDirectMusicSegmentState8_QueryInterface(dmss8, &IID_IUnknown, NULL);
ok(hr == E_POINTER, "got %08x\n", hr);
ok(hr == E_POINTER, "got %#lx\n", hr);
while (IDirectMusicSegmentState8_Release(dmss8));
}
......@@ -381,44 +378,43 @@ static void test_COM_track(void)
continue;
}
ok(hr == CLASS_E_NOAGGREGATION,
"%s create failed: %08x, expected CLASS_E_NOAGGREGATION\n", class[i].name, hr);
"%s create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", class[i].name, hr);
ok(!dmt8, "dmt8 = %p\n", dmt8);
/* Invalid RIID */
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject,
(void**)&dmt8);
ok(hr == E_NOINTERFACE, "%s create failed: %08x, expected E_NOINTERFACE\n",
class[i].name, hr);
ok(hr == E_NOINTERFACE, "%s create failed: %#lx, expected E_NOINTERFACE\n", class[i].name, hr);
/* Same refcount for all DirectMusicTrack interfaces */
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack,
(void**)&dmt);
ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr);
ok(hr == S_OK, "%s create failed: %#lx, expected S_OK\n", class[i].name, hr);
refcount = IDirectMusicTrack_AddRef(dmt);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IPersistStream_Release(ps);
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IDirectMusicTrack8, (void**)&dmt8);
if (class[i].has_dmt8) {
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicTrack8 failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicTrack8 failed: %#lx\n", hr);
refcount = IDirectMusicTrack8_AddRef(dmt8);
ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
refcount = IDirectMusicTrack8_Release(dmt8);
} else {
ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicTrack8 failed: %08x\n", hr);
ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicTrack8 failed: %#lx\n", hr);
refcount = IDirectMusicTrack_AddRef(dmt);
ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
}
while (IDirectMusicTrack_Release(dmt));
......@@ -439,23 +435,23 @@ static void test_audiopathconfig(void)
win_skip("DirectMusicAudioPathConfig not registered\n");
return;
}
ok(hr == S_OK, "DirectMusicAudioPathConfig create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicAudioPathConfig create failed: %#lx, expected S_OK\n", hr);
/* IPersistStream */
hr = IDirectMusicObject_QueryInterface(dmo, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
ok(IsEqualGUID(&class, &CLSID_DirectMusicAudioPathConfig),
"Expected class CLSID_DirectMusicAudioPathConfig got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods */
hr = IPersistStream_IsDirty(ps);
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicObject_Release(dmo));
}
......@@ -470,24 +466,24 @@ static void test_graph(void)
hr = CoCreateInstance(&CLSID_DirectMusicGraph, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicGraph, (void**)&dmg);
ok(hr == S_OK, "DirectMusicGraph create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicGraph create failed: %#lx, expected S_OK\n", hr);
/* IPersistStream */
hr = IDirectMusicGraph_QueryInterface(dmg, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
ok(hr == S_OK || broken(hr == E_NOTIMPL) /* win2k */, "IPersistStream_GetClassID failed: %08x\n", hr);
ok(hr == S_OK || broken(hr == E_NOTIMPL) /* win2k */, "IPersistStream_GetClassID failed: %#lx\n", hr);
if (hr == S_OK)
ok(IsEqualGUID(&class, &CLSID_DirectMusicGraph),
"Expected class CLSID_DirectMusicGraph got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods */
hr = IPersistStream_IsDirty(ps);
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicGraph_Release(dmg));
}
......@@ -502,24 +498,24 @@ static void test_segment(void)
hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicSegment, (void**)&dms);
ok(hr == S_OK, "DirectMusicSegment create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicSegment create failed: %#lx, expected S_OK\n", hr);
/* IPersistStream */
hr = IDirectMusicSegment_QueryInterface(dms, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
ok(hr == S_OK || broken(hr == E_NOTIMPL) /* win2k */, "IPersistStream_GetClassID failed: %08x\n", hr);
ok(hr == S_OK || broken(hr == E_NOTIMPL) /* win2k */, "IPersistStream_GetClassID failed: %#lx\n", hr);
if (hr == S_OK)
ok(IsEqualGUID(&class, &CLSID_DirectMusicSegment),
"Expected class CLSID_DirectMusicSegment got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods */
hr = IPersistStream_IsDirty(ps);
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicSegment_Release(dms));
}
......@@ -531,12 +527,12 @@ static void _add_track(IDirectMusicSegment8 *seg, REFCLSID class, const char *na
hr = CoCreateInstance(class, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack,
(void**)&track);
ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", name, hr);
ok(hr == S_OK, "%s create failed: %#lx, expected S_OK\n", name, hr);
hr = IDirectMusicSegment8_InsertTrack(seg, track, group);
if (group)
ok(hr == S_OK, "Inserting %s failed: %08x, expected S_OK\n", name, hr);
ok(hr == S_OK, "Inserting %s failed: %#lx, expected S_OK\n", name, hr);
else
ok(hr == E_INVALIDARG, "Inserting %s failed: %08x, expected E_INVALIDARG\n", name, hr);
ok(hr == E_INVALIDARG, "Inserting %s failed: %#lx, expected E_INVALIDARG\n", name, hr);
IDirectMusicTrack_Release(track);
}
......@@ -555,16 +551,16 @@ static void _expect_track(IDirectMusicSegment8 *seg, REFCLSID expect, const char
else
hr = IDirectMusicSegment8_GetTrack(seg, expect, group, index, &track);
if (!expect) {
ok(hr == DMUS_E_NOT_FOUND, "GetTrack failed: %08x, expected DMUS_E_NOT_FOUND\n", hr);
ok(hr == DMUS_E_NOT_FOUND, "GetTrack failed: %#lx, expected DMUS_E_NOT_FOUND\n", hr);
return;
}
ok(hr == S_OK, "GetTrack failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "GetTrack failed: %#lx, expected S_OK\n", hr);
hr = IDirectMusicTrack_QueryInterface(track, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
ok(IsEqualGUID(&class, expect), "For group %#x index %u: Expected class %s got %s\n",
ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
ok(IsEqualGUID(&class, expect), "For group %#lx index %lu: Expected class %s got %s\n",
group, index, name, wine_dbgstr_guid(&class));
IPersistStream_Release(ps);
......@@ -584,7 +580,7 @@ static void test_gettrack(void)
hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicSegment8, (void**)&seg);
ok(hr == S_OK, "DirectMusicSegment create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicSegment create failed: %#lx, expected S_OK\n", hr);
add_track(seg, LyricsTrack, 0x0); /* failure */
add_track(seg, LyricsTrack, 0x1); /* idx 0 group 1 */
......@@ -596,7 +592,7 @@ static void test_gettrack(void)
/* Ignore GUID in GetTrack */
hr = IDirectMusicSegment8_GetTrack(seg, &GUID_NULL, 0, 0, &track);
ok(hr == DMUS_E_NOT_FOUND, "GetTrack failed: %08x, expected DMUS_E_NOT_FOUND\n", hr);
ok(hr == DMUS_E_NOT_FOUND, "GetTrack failed: %#lx, expected DMUS_E_NOT_FOUND\n", hr);
expect_track(seg, LyricsTrack, 0x1, 0);
expect_track(seg, ParamControlTrack, 0x1, 1);
......@@ -615,7 +611,7 @@ static void test_gettrack(void)
/* Use the GUID in GetTrack */
hr = IDirectMusicSegment8_GetTrack(seg, &CLSID_DirectMusicLyricsTrack, 0, 0, &track);
ok(hr == DMUS_E_NOT_FOUND, "GetTrack failed: %08x, expected DMUS_E_NOT_FOUND\n", hr);
ok(hr == DMUS_E_NOT_FOUND, "GetTrack failed: %#lx, expected DMUS_E_NOT_FOUND\n", hr);
expect_guid_track(seg, LyricsTrack, 0x1, 0);
expect_guid_track(seg, ParamControlTrack, 0x1, 0);
......@@ -638,35 +634,32 @@ static void test_segment_param(void)
hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicSegment8, (void **)&seg);
ok(hr == S_OK, "DirectMusicSegment create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicSegment create failed: %#lx, expected S_OK\n", hr);
add_track(seg, LyricsTrack, 0x1); /* no params */
add_track(seg, SegmentTriggerTrack, 0x1); /* all params "supported" */
hr = IDirectMusicSegment8_GetParam(seg, NULL, 0x1, 0, 0, NULL, buf);
ok(hr == E_POINTER, "GetParam failed: %08x, expected E_POINTER\n", hr);
ok(hr == E_POINTER, "GetParam failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicSegment8_SetParam(seg, NULL, 0x1, 0, 0, buf);
todo_wine ok(hr == E_POINTER, "SetParam failed: %08x, expected E_POINTER\n", hr);
todo_wine ok(hr == E_POINTER, "SetParam failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicSegment8_GetParam(seg, &GUID_Valid_Start_Time, 0x1, 0, 0, NULL, buf);
ok(hr == DMUS_E_GET_UNSUPPORTED,
"GetParam failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n", hr);
ok(hr == DMUS_E_GET_UNSUPPORTED, "GetParam failed: %#lx, expected DMUS_E_GET_UNSUPPORTED\n", hr);
hr = IDirectMusicSegment8_GetParam(seg, &GUID_Valid_Start_Time, 0x1, 1, 0, NULL, buf);
ok(hr == DMUS_E_TRACK_NOT_FOUND,
"GetParam failed: %08x, expected DMUS_E_TRACK_NOT_FOUND\n", hr);
ok(hr == DMUS_E_TRACK_NOT_FOUND, "GetParam failed: %#lx, expected DMUS_E_TRACK_NOT_FOUND\n", hr);
hr = IDirectMusicSegment8_GetParam(seg, &GUID_Valid_Start_Time, 0x1, DMUS_SEG_ANYTRACK, 0,
NULL, buf);
ok(hr == DMUS_E_GET_UNSUPPORTED,
"GetParam failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n", hr);
ok(hr == DMUS_E_GET_UNSUPPORTED, "GetParam failed: %#lx, expected DMUS_E_GET_UNSUPPORTED\n", hr);
hr = IDirectMusicSegment8_SetParam(seg, &GUID_Valid_Start_Time, 0x1, 0, 0, buf);
ok(hr == S_OK, "SetParam failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "SetParam failed: %#lx, expected S_OK\n", hr);
hr = IDirectMusicSegment8_SetParam(seg, &GUID_Valid_Start_Time, 0x1, 1, 0, buf);
todo_wine ok(hr == DMUS_E_TRACK_NOT_FOUND,
"SetParam failed: %08x, expected DMUS_E_TRACK_NOT_FOUND\n", hr);
"SetParam failed: %#lx, expected DMUS_E_TRACK_NOT_FOUND\n", hr);
hr = IDirectMusicSegment8_SetParam(seg, &GUID_Valid_Start_Time, 0x1, DMUS_SEG_ALLTRACKS,
0, buf);
ok(hr == S_OK, "SetParam failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "SetParam failed: %#lx, expected S_OK\n", hr);
IDirectMusicSegment8_Release(seg);
}
......@@ -678,7 +671,7 @@ static void expect_getparam(IDirectMusicTrack *track, REFGUID type, const char *
char buf[64] = { 0 };
hr = IDirectMusicTrack8_GetParam(track, type, 0, NULL, buf);
ok(hr == expect, "GetParam(%s) failed: %08x, expected %08x\n", name, hr, expect);
ok(hr == expect, "GetParam(%s) failed: %#lx, expected %#lx\n", name, hr, expect);
}
static void expect_setparam(IDirectMusicTrack *track, REFGUID type, const char *name,
......@@ -688,7 +681,7 @@ static void expect_setparam(IDirectMusicTrack *track, REFGUID type, const char *
char buf[64] = { 0 };
hr = IDirectMusicTrack8_SetParam(track, type, 0, buf);
ok(hr == expect, "SetParam(%s) failed: %08x, expected %08x\n", name, hr, expect);
ok(hr == expect, "SetParam(%s) failed: %#lx, expected %#lx\n", name, hr, expect);
}
static void test_track(void)
......@@ -760,14 +753,14 @@ static void test_track(void)
trace("Testing %s\n", class[i].name);
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack,
(void**)&dmt);
ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr);
ok(hr == S_OK, "%s create failed: %#lx, expected S_OK\n", class[i].name, hr);
/* IDirectMusicTrack */
if (class[i].has_params != ~0) {
for (j = 0; j < ARRAY_SIZE(param_types); j++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt, param_types[j].type);
if (class[i].has_params & (1 << j)) {
ok(hr == S_OK, "IsParamSupported(%s) failed: %08x, expected S_OK\n",
ok(hr == S_OK, "IsParamSupported(%s) failed: %#lx, expected S_OK\n",
param_types[j].name, hr);
if (class[i].clsid == &CLSID_DirectMusicSegmentTriggerTrack) {
expect_getparam(dmt, param_types[j].type, param_types[j].name,
......@@ -781,7 +774,7 @@ static void test_track(void)
DMUS_E_GET_UNSUPPORTED);
} else {
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
"IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
"IsParamSupported(%s) failed: %#lx, expected DMUS_E_TYPE_UNSUPPORTED\n",
param_types[j].name, hr);
expect_getparam(dmt, param_types[j].type, param_types[j].name,
DMUS_E_GET_UNSUPPORTED);
......@@ -810,61 +803,61 @@ static void test_track(void)
}
} else {
hr = IDirectMusicTrack_GetParam(dmt, NULL, 0, NULL, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_GetParam failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_GetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack_SetParam(dmt, NULL, 0, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_SetParam failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_SetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack_IsParamSupported(dmt, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_IsParamSupported failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_IsParamSupported failed: %#lx\n", hr);
hr = IDirectMusicTrack_IsParamSupported(dmt, &GUID_IDirectMusicStyle);
ok(hr == E_NOTIMPL, "got: %08x\n", hr);
ok(hr == E_NOTIMPL, "got: %#lx\n", hr);
}
if (class[i].clsid != &CLSID_DirectMusicMarkerTrack &&
class[i].clsid != &CLSID_DirectMusicTimeSigTrack) {
hr = IDirectMusicTrack_AddNotificationType(dmt, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_AddNotificationType failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_AddNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack_RemoveNotificationType(dmt, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_RemoveNotificationType failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IDirectMusicTrack_RemoveNotificationType failed: %#lx\n", hr);
}
hr = IDirectMusicTrack_Clone(dmt, 0, 0, NULL);
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack_Clone failed: %08x\n", hr);
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack_Clone failed: %#lx\n", hr);
/* IDirectMusicTrack8 */
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IDirectMusicTrack8, (void**)&dmt8);
if (hr == S_OK) {
hr = IDirectMusicTrack8_PlayEx(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %08x\n", hr);
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %#lx\n", hr);
if (class[i].has_params == ~0) {
hr = IDirectMusicTrack8_GetParamEx(dmt8, NULL, 0, NULL, NULL, NULL, 0);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_GetParamEx failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_GetParamEx failed: %#lx\n", hr);
hr = IDirectMusicTrack8_SetParamEx(dmt8, NULL, 0, NULL, NULL, 0);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_SetParamEx failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_SetParamEx failed: %#lx\n", hr);
}
hr = IDirectMusicTrack8_Compose(dmt8, NULL, 0, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL);
if (class[i].clsid == &CLSID_DirectMusicTempoTrack)
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %08x\n", hr);
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
else
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
IDirectMusicTrack8_Release(dmt8);
}
/* IPersistStream */
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &classid);
ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
ok(IsEqualGUID(&classid, class[i].clsid),
"Expected class %s got %s\n", class[i].name, wine_dbgstr_guid(&classid));
hr = IPersistStream_IsDirty(ps);
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
/* Unimplemented IPersistStream methods */
hr = IPersistStream_GetSizeMax(ps, &size);
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicTrack_Release(dmt));
}
......@@ -995,7 +988,7 @@ static void test_parsedescriptor(void)
hr = CoCreateInstance(forms[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject,
(void **)&dmo);
if (hr != S_OK) {
win_skip("Could not create %s object: %08x\n", forms[i].class, hr);
win_skip("Could not create %s object: %#lx\n", forms[i].class, hr);
return;
}
......@@ -1003,13 +996,12 @@ static void test_parsedescriptor(void)
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
if (forms[i].needs_size) {
todo_wine ok(hr == E_INVALIDARG,
"GetDescriptor failed: %08x, expected E_INVALIDARG\n", hr);
todo_wine ok(hr == E_INVALIDARG, "GetDescriptor failed: %#lx, expected E_INVALIDARG\n", hr);
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
}
ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
ok(hr == S_OK, "GetDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, forms[i].clsid), "Got class guid %s, expected CLSID_%s\n",
wine_dbgstr_guid(&desc.guidClass), forms[i].class);
......@@ -1020,12 +1012,12 @@ static void test_parsedescriptor(void)
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
if (forms[i].needs_size) {
ok(hr == E_INVALIDARG, "ParseDescriptor failed: %08x, expected E_INVALIDARG\n", hr);
ok(hr == E_INVALIDARG, "ParseDescriptor failed: %#lx, expected E_INVALIDARG\n", hr);
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
}
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, forms[i].clsid), "Got class guid %s, expected CLSID_%s\n",
wine_dbgstr_guid(&desc.guidClass), forms[i].class);
......@@ -1034,14 +1026,14 @@ static void test_parsedescriptor(void)
memset(&desc, 0, sizeof(desc));
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, &desc);
ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, NULL);
if (forms[i].needs_size)
ok(hr == E_INVALIDARG, "ParseDescriptor failed: %08x, expected E_INVALIDARG\n", hr);
ok(hr == E_INVALIDARG, "ParseDescriptor failed: %#lx, expected E_INVALIDARG\n", hr);
else
ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, NULL);
ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
IStream_Release(stream);
/* Wrong form */
......@@ -1052,10 +1044,10 @@ static void test_parsedescriptor(void)
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
if (forms[i].needs_size)
ok(hr == DMUS_E_CHUNKNOTFOUND,
"ParseDescriptor failed: %08x, expected DMUS_E_CHUNKNOTFOUND\n", hr);
"ParseDescriptor failed: %#lx, expected DMUS_E_CHUNKNOTFOUND\n", hr);
else
ok(hr == E_FAIL, "ParseDescriptor failed: %08x, expected E_FAIL\n", hr);
ok(!desc.dwValidData, "Got valid data %#x, expected 0\n", desc.dwValidData);
ok(hr == E_FAIL, "ParseDescriptor failed: %#lx, expected E_FAIL\n", hr);
ok(!desc.dwValidData, "Got valid data %#lx, expected 0\n", desc.dwValidData);
IStream_Release(stream);
/* Not a RIFF stream */
......@@ -1065,10 +1057,10 @@ static void test_parsedescriptor(void)
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
if (forms[i].needs_size)
ok(hr == DMUS_E_CHUNKNOTFOUND,
"ParseDescriptor failed: %08x, expected DMUS_E_CHUNKNOTFOUND\n", hr);
"ParseDescriptor failed: %#lx, expected DMUS_E_CHUNKNOTFOUND\n", hr);
else
ok(hr == E_FAIL, "ParseDescriptor failed: %08x, expected E_FAIL\n", hr);
ok(!desc.dwValidData, "Got valid data %#x, expected 0\n", desc.dwValidData);
ok(hr == E_FAIL, "ParseDescriptor failed: %#lx, expected E_FAIL\n", hr);
ok(!desc.dwValidData, "Got valid data %#lx, expected 0\n", desc.dwValidData);
IStream_Release(stream);
/* All desc chunks */
......@@ -1077,17 +1069,17 @@ static void test_parsedescriptor(void)
memset(&desc, 0, sizeof(desc));
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
valid = DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS | DMUS_OBJ_VERSION;
if (forms[i].form != mmioFOURCC('W','A','V','E'))
valid |= DMUS_OBJ_NAME | DMUS_OBJ_CATEGORY;
ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
ok(IsEqualGUID(&desc.guidClass, forms[i].clsid), "Got class guid %s, expected CLSID_%s\n",
wine_dbgstr_guid(&desc.guidClass), forms[i].class);
ok(IsEqualGUID(&desc.guidObject, &GUID_NULL), "Got object guid %s, expected GUID_NULL\n",
wine_dbgstr_guid(&desc.guidClass));
ok(desc.vVersion.dwVersionMS == 5 && desc.vVersion.dwVersionLS == 8,
"Got version %u.%u, expected 5.8\n", desc.vVersion.dwVersionMS,
"Got version %lu.%lu, expected 5.8\n", desc.vVersion.dwVersionMS,
desc.vVersion.dwVersionLS);
if (forms[i].form != mmioFOURCC('W','A','V','E'))
ok(!lstrcmpW(desc.wszName, L"UNAM"), "Got name '%s', expected 'UNAM'\n",
......@@ -1100,8 +1092,8 @@ static void test_parsedescriptor(void)
memset(&desc, 0, sizeof(desc));
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
IStream_Release(stream);
/* UNFO list with INAM */
......@@ -1111,8 +1103,8 @@ static void test_parsedescriptor(void)
memset(&desc, 0, sizeof(desc));
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
IStream_Release(stream);
......@@ -1122,11 +1114,11 @@ static void test_parsedescriptor(void)
memset(&desc, 0, sizeof(desc));
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
valid = DMUS_OBJ_CLASS;
if (forms[i].form == mmioFOURCC('W','A','V','E'))
valid |= DMUS_OBJ_NAME;
ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
if (forms[i].form == mmioFOURCC('W','A','V','E'))
ok(!lstrcmpW(desc.wszName, L"I"), "Got name '%s', expected 'I'\n",
wine_dbgstr_w(desc.wszName));
......
......@@ -38,18 +38,18 @@ static void create_performance(IDirectMusicPerformance8 **performance, IDirectMu
hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicPerformance8, (void **)performance);
ok(hr == S_OK, "DirectMusicPerformance create failed: %08x\n", hr);
ok(hr == S_OK, "DirectMusicPerformance create failed: %#lx\n", hr);
if (dmusic) {
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8,
(void **)dmusic);
ok(hr == S_OK, "DirectMusic create failed: %08x\n", hr);
ok(hr == S_OK, "DirectMusic create failed: %#lx\n", hr);
}
if (dsound) {
hr = DirectSoundCreate8(NULL, (IDirectSound8 **)dsound, NULL);
ok(hr == S_OK, "DirectSoundCreate failed: %08x\n", hr);
ok(hr == S_OK, "DirectSoundCreate failed: %#lx\n", hr);
if (set_cooplevel) {
hr = IDirectSound_SetCooperativeLevel(*dsound, GetForegroundWindow(), DSSCL_PRIORITY);
ok(hr == S_OK, "SetCooperativeLevel failed: %08x\n", hr);
ok(hr == S_OK, "SetCooperativeLevel failed: %#lx\n", hr);
}
}
}
......@@ -60,7 +60,7 @@ static void destroy_performance(IDirectMusicPerformance8 *performance, IDirectMu
HRESULT hr;
hr = IDirectMusicPerformance8_CloseDown(performance);
ok(hr == S_OK, "CloseDown failed: %08x\n", hr);
ok(hr == S_OK, "CloseDown failed: %#lx\n", hr);
IDirectMusicPerformance8_Release(performance);
if (dmusic)
IDirectMusic_Release(dmusic);
......@@ -89,7 +89,7 @@ static HRESULT test_InitAudio(void)
hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicPerformance8, (void **)&performance);
if (hr != S_OK) {
skip("Cannot create DirectMusicPerformance object (%x)\n", hr);
skip("Cannot create DirectMusicPerformance object (%lx)\n", hr);
CoUninitialize();
return hr;
}
......@@ -103,36 +103,36 @@ static HRESULT test_InitAudio(void)
}
hr = IDirectMusicPerformance8_PChannelInfo(performance, 128, &port, NULL, NULL);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x\n", hr);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %#lx\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(performance, 127, &port, NULL, NULL);
ok(hr == S_OK, "PChannelInfo failed, got %08x\n", hr);
ok(hr == S_OK, "PChannelInfo failed, got %#lx\n", hr);
IDirectMusicPort_Release(port);
port = NULL;
hr = IDirectMusicPerformance8_PChannelInfo(performance, 0, &port, NULL, NULL);
ok(hr == S_OK, "PChannelInfo failed, got %08x\n", hr);
ok(hr == S_OK, "PChannelInfo failed, got %#lx\n", hr);
ok(port != NULL, "IDirectMusicPort not set\n");
hr = IDirectMusicPerformance8_AssignPChannel(performance, 0, port, 0, 0);
todo_wine ok(hr == DMUS_E_AUDIOPATHS_IN_USE, "AssignPChannel failed (%08x)\n", hr);
todo_wine ok(hr == DMUS_E_AUDIOPATHS_IN_USE, "AssignPChannel failed (%#lx)\n", hr);
hr = IDirectMusicPerformance8_AssignPChannelBlock(performance, 0, port, 0);
todo_wine ok(hr == DMUS_E_AUDIOPATHS_IN_USE, "AssignPChannelBlock failed (%08x)\n", hr);
todo_wine ok(hr == DMUS_E_AUDIOPATHS_IN_USE, "AssignPChannelBlock failed (%#lx)\n", hr);
IDirectMusicPort_Release(port);
hr = IDirectMusicPerformance8_GetDefaultAudioPath(performance, &path);
ok(hr == S_OK, "Failed to call GetDefaultAudioPath (%x)\n", hr);
ok(hr == S_OK, "Failed to call GetDefaultAudioPath (%lx)\n", hr);
if (hr == S_OK)
IDirectMusicAudioPath_Release(path);
hr = IDirectMusicPerformance8_CloseDown(performance);
ok(hr == S_OK, "Failed to call CloseDown (%x)\n", hr);
ok(hr == S_OK, "Failed to call CloseDown (%lx)\n", hr);
IDirectMusicPerformance8_Release(performance);
/* Auto generated dmusic and dsound */
create_performance(&performance, NULL, NULL, FALSE);
hr = IDirectMusicPerformance8_InitAudio(performance, NULL, NULL, NULL, 0, 64, 0, NULL);
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
ok(hr == S_OK, "InitAudio failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(performance, 0, &port, NULL, NULL);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x\n", hr);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %#lx\n", hr);
destroy_performance(performance, NULL, NULL);
/* Refcounts for auto generated dmusic and dsound */
......@@ -140,93 +140,93 @@ static HRESULT test_InitAudio(void)
dmusic = NULL;
dsound = NULL;
hr = IDirectMusicPerformance8_InitAudio(performance, &dmusic, &dsound, NULL, 0, 64, 0, NULL);
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
ok(hr == S_OK, "InitAudio failed: %#lx\n", hr);
ref = get_refcount(dsound);
ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
ok(ref == 3, "dsound ref count got %ld expected 3\n", ref);
ref = get_refcount(dmusic);
ok(ref == 2, "dmusic ref count got %d expected 2\n", ref);
ok(ref == 2, "dmusic ref count got %ld expected 2\n", ref);
destroy_performance(performance, NULL, NULL);
/* dsound without SetCooperativeLevel() */
create_performance(&performance, NULL, &dsound, FALSE);
hr = IDirectMusicPerformance8_InitAudio(performance, NULL, &dsound, NULL, 0, 0, 0, NULL);
todo_wine ok(hr == DSERR_PRIOLEVELNEEDED, "InitAudio failed: %08x\n", hr);
todo_wine ok(hr == DSERR_PRIOLEVELNEEDED, "InitAudio failed: %#lx\n", hr);
destroy_performance(performance, NULL, dsound);
/* Using the wrong CLSID_DirectSound */
create_performance(&performance, NULL, NULL, FALSE);
hr = DirectSoundCreate(NULL, &dsound, NULL);
ok(hr == S_OK, "DirectSoundCreate failed: %08x\n", hr);
ok(hr == S_OK, "DirectSoundCreate failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_InitAudio(performance, NULL, &dsound, NULL, 0, 0, 0, NULL);
todo_wine ok(hr == E_NOINTERFACE, "InitAudio failed: %08x\n", hr);
todo_wine ok(hr == E_NOINTERFACE, "InitAudio failed: %#lx\n", hr);
destroy_performance(performance, NULL, dsound);
/* Init() works with just a CLSID_DirectSound */
create_performance(&performance, NULL, NULL, FALSE);
hr = DirectSoundCreate(NULL, &dsound, NULL);
ok(hr == S_OK, "DirectSoundCreate failed: %08x\n", hr);
ok(hr == S_OK, "DirectSoundCreate failed: %#lx\n", hr);
hr = IDirectSound_SetCooperativeLevel(dsound, GetForegroundWindow(), DSSCL_PRIORITY);
ok(hr == S_OK, "SetCooperativeLevel failed: %08x\n", hr);
ok(hr == S_OK, "SetCooperativeLevel failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_Init(performance, NULL, dsound, NULL);
ok(hr == S_OK, "Init failed: %08x\n", hr);
ok(hr == S_OK, "Init failed: %#lx\n", hr);
destroy_performance(performance, NULL, dsound);
/* Init() followed by InitAudio() */
create_performance(&performance, NULL, &dsound, TRUE);
hr = IDirectMusicPerformance8_Init(performance, NULL, dsound, NULL);
ok(hr == S_OK, "Init failed: %08x\n", hr);
ok(hr == S_OK, "Init failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_InitAudio(performance, NULL, &dsound, NULL, 0, 0, 0, NULL);
ok(hr == DMUS_E_ALREADY_INITED, "InitAudio failed: %08x\n", hr);
ok(hr == DMUS_E_ALREADY_INITED, "InitAudio failed: %#lx\n", hr);
destroy_performance(performance, NULL, dsound);
/* Provided dmusic and dsound */
create_performance(&performance, &dmusic, &dsound, TRUE);
hr = IDirectMusicPerformance8_InitAudio(performance, &dmusic, &dsound, NULL, 0, 64, 0, NULL);
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
ok(hr == S_OK, "InitAudio failed: %#lx\n", hr);
ref = get_refcount(dsound);
todo_wine ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
todo_wine ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
ref = get_refcount(dmusic);
ok(ref == 2, "dmusic ref count got %d expected 2\n", ref);
ok(ref == 2, "dmusic ref count got %ld expected 2\n", ref);
destroy_performance(performance, dmusic, dsound);
/* Provided dmusic initialized with SetDirectSound */
create_performance(&performance, &dmusic, &dsound, TRUE);
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
hr = IDirectMusicPerformance8_InitAudio(performance, &dmusic, NULL, NULL, 0, 64, 0, NULL);
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
ok(hr == S_OK, "InitAudio failed: %#lx\n", hr);
ref = get_refcount(dsound);
todo_wine ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
todo_wine ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
ref = get_refcount(dmusic);
ok(ref == 2, "dmusic ref count got %d expected 2\n", ref);
ok(ref == 2, "dmusic ref count got %ld expected 2\n", ref);
destroy_performance(performance, dmusic, dsound);
/* Provided dmusic and dsound, dmusic initialized with SetDirectSound */
create_performance(&performance, &dmusic, &dsound, TRUE);
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
hr = IDirectMusicPerformance8_InitAudio(performance, &dmusic, &dsound, NULL, 0, 64, 0, NULL);
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
ok(hr == S_OK, "InitAudio failed: %#lx\n", hr);
ref = get_refcount(dsound);
ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
ok(ref == 3, "dsound ref count got %ld expected 3\n", ref);
ref = get_refcount(dmusic);
ok(ref == 2, "dmusic ref count got %d expected 2\n", ref);
ok(ref == 2, "dmusic ref count got %ld expected 2\n", ref);
destroy_performance(performance, dmusic, dsound);
/* InitAudio with perf channel count not a multiple of 16 rounds up */
create_performance(&performance, NULL, NULL, TRUE);
hr = IDirectMusicPerformance8_InitAudio(performance, NULL, NULL, NULL,
DMUS_APATH_SHARED_STEREOPLUSREVERB, 29, DMUS_AUDIOF_ALL, NULL);
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
ok(hr == S_OK, "InitAudio failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(performance, 31, &port, &group, &channel);
ok(hr == S_OK && group == 2 && channel == 15,
"PChannelInfo failed, got %08x, %u, %u\n", hr, group, channel);
"PChannelInfo failed, got %#lx, %lu, %lu\n", hr, group, channel);
hr = IDirectMusicPerformance8_PChannelInfo(performance, 32, &port, NULL, NULL);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x\n", hr);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %#lx\n", hr);
destroy_performance(performance, NULL, NULL);
return S_OK;
......@@ -244,10 +244,10 @@ static void test_createport(void)
hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL,
CLSCTX_INPROC_SERVER, &IID_IDirectMusicPerformance8, (void**)&perf);
ok(hr == S_OK, "CoCreateInstance failed: %08x\n", hr);
ok(hr == S_OK, "CoCreateInstance failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_Init(perf, &music, NULL, NULL);
ok(hr == S_OK, "Init failed: %08x\n", hr);
ok(hr == S_OK, "Init failed: %#lx\n", hr);
ok(music != NULL, "Didn't get IDirectMusic pointer\n");
i = 0;
......@@ -255,21 +255,21 @@ static void test_createport(void)
portcaps.dwSize = sizeof(portcaps);
hr = IDirectMusic_EnumPort(music, i, &portcaps);
ok(hr == S_OK || hr == S_FALSE || (i == 0 && hr == E_INVALIDARG), "EnumPort failed: %08x\n", hr);
ok(hr == S_OK || hr == S_FALSE || (i == 0 && hr == E_INVALIDARG), "EnumPort failed: %#lx\n", hr);
if(hr != S_OK)
break;
ok(portcaps.dwSize == sizeof(portcaps), "Got unexpected portcaps struct size: %08x\n", portcaps.dwSize);
trace("portcaps(%u).dwFlags: %08x\n", i, portcaps.dwFlags);
trace("portcaps(%u).guidPort: %s\n", i, wine_dbgstr_guid(&portcaps.guidPort));
trace("portcaps(%u).dwClass: %08x\n", i, portcaps.dwClass);
trace("portcaps(%u).dwType: %08x\n", i, portcaps.dwType);
trace("portcaps(%u).dwMemorySize: %08x\n", i, portcaps.dwMemorySize);
trace("portcaps(%u).dwMaxChannelGroups: %08x\n", i, portcaps.dwMaxChannelGroups);
trace("portcaps(%u).dwMaxVoices: %08x\n", i, portcaps.dwMaxVoices);
trace("portcaps(%u).dwMaxAudioChannels: %08x\n", i, portcaps.dwMaxAudioChannels);
trace("portcaps(%u).dwEffectFlags: %08x\n", i, portcaps.dwEffectFlags);
trace("portcaps(%u).wszDescription: %s\n", i, wine_dbgstr_w(portcaps.wszDescription));
ok(portcaps.dwSize == sizeof(portcaps), "Got unexpected portcaps struct size: %lu\n", portcaps.dwSize);
trace("portcaps(%lu).dwFlags: %#lx\n", i, portcaps.dwFlags);
trace("portcaps(%lu).guidPort: %s\n", i, wine_dbgstr_guid(&portcaps.guidPort));
trace("portcaps(%lu).dwClass: %#lx\n", i, portcaps.dwClass);
trace("portcaps(%lu).dwType: %#lx\n", i, portcaps.dwType);
trace("portcaps(%lu).dwMemorySize: %#lx\n", i, portcaps.dwMemorySize);
trace("portcaps(%lu).dwMaxChannelGroups: %lu\n", i, portcaps.dwMaxChannelGroups);
trace("portcaps(%lu).dwMaxVoices: %lu\n", i, portcaps.dwMaxVoices);
trace("portcaps(%lu).dwMaxAudioChannels: %lu\n", i, portcaps.dwMaxAudioChannels);
trace("portcaps(%lu).dwEffectFlags: %#lx\n", i, portcaps.dwEffectFlags);
trace("portcaps(%lu).wszDescription: %s\n", i, wine_dbgstr_w(portcaps.wszDescription));
++i;
}
......@@ -284,7 +284,7 @@ static void test_createport(void)
/* dwValidParams == 0 -> S_OK, filled struct */
portparams.dwValidParams = 0;
hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, &portparams, &port, NULL);
ok(hr == S_OK, "CreatePort failed: %08x\n", hr);
ok(hr == S_OK, "CreatePort failed: %#lx\n", hr);
ok(port != NULL, "Didn't get IDirectMusicPort pointer\n");
ok(portparams.dwValidParams, "portparams struct was not filled in\n");
IDirectMusicPort_Release(port);
......@@ -294,7 +294,7 @@ static void test_createport(void)
portparams.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS;
portparams.dwChannelGroups = 0;
hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, &portparams, &port, NULL);
todo_wine ok(hr == S_FALSE, "CreatePort failed: %08x\n", hr);
todo_wine ok(hr == S_FALSE, "CreatePort failed: %#lx\n", hr);
ok(port != NULL, "Didn't get IDirectMusicPort pointer\n");
ok(portparams.dwValidParams, "portparams struct was not filled in\n");
IDirectMusicPort_Release(port);
......@@ -302,7 +302,7 @@ static void test_createport(void)
/* dwValidParams != 0, valid params -> S_OK */
hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, &portparams, &port, NULL);
ok(hr == S_OK, "CreatePort failed: %08x\n", hr);
ok(hr == S_OK, "CreatePort failed: %#lx\n", hr);
ok(port != NULL, "Didn't get IDirectMusicPort pointer\n");
IDirectMusicPort_Release(port);
port = NULL;
......@@ -310,7 +310,7 @@ static void test_createport(void)
/* GUID_NULL succeeds */
portparams.dwValidParams = 0;
hr = IDirectMusic_CreatePort(music, &GUID_NULL, &portparams, &port, NULL);
ok(hr == S_OK, "CreatePort failed: %08x\n", hr);
ok(hr == S_OK, "CreatePort failed: %#lx\n", hr);
ok(port != NULL, "Didn't get IDirectMusicPort pointer\n");
ok(portparams.dwValidParams, "portparams struct was not filled in\n");
IDirectMusicPort_Release(port);
......@@ -319,19 +319,19 @@ static void test_createport(void)
/* null GUID fails */
portparams.dwValidParams = 0;
hr = IDirectMusic_CreatePort(music, NULL, &portparams, &port, NULL);
ok(hr == E_POINTER, "CreatePort failed: %08x\n", hr);
ok(hr == E_POINTER, "CreatePort failed: %#lx\n", hr);
ok(port == NULL, "Get IDirectMusicPort pointer? %p\n", port);
ok(portparams.dwValidParams == 0, "portparams struct was filled in?\n");
/* garbage GUID fails */
portparams.dwValidParams = 0;
hr = IDirectMusic_CreatePort(music, &GUID_Bunk, &portparams, &port, NULL);
ok(hr == E_NOINTERFACE, "CreatePort failed: %08x\n", hr);
ok(hr == E_NOINTERFACE, "CreatePort failed: %#lx\n", hr);
ok(port == NULL, "Get IDirectMusicPort pointer? %p\n", port);
ok(portparams.dwValidParams == 0, "portparams struct was filled in?\n");
hr = IDirectMusicPerformance8_CloseDown(perf);
ok(hr == S_OK, "CloseDown failed: %08x\n", hr);
ok(hr == S_OK, "CloseDown failed: %#lx\n", hr);
IDirectMusic_Release(music);
IDirectMusicPerformance_Release(perf);
......@@ -347,99 +347,99 @@ static void test_pchannel(void)
create_performance(&perf, NULL, NULL, TRUE);
hr = IDirectMusicPerformance8_Init(perf, NULL, NULL, NULL);
ok(hr == S_OK, "Init failed: %08x\n", hr);
ok(hr == S_OK, "Init failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(perf, 0, &port, NULL, NULL);
ok(hr == E_INVALIDARG && !port, "PChannelInfo failed, got %08x, %p\n", hr, port);
ok(hr == E_INVALIDARG && !port, "PChannelInfo failed, got %#lx, %p\n", hr, port);
/* Add default port. Sets PChannels 0-15 to the corresponding channels in group 1 */
hr = IDirectMusicPerformance8_AddPort(perf, NULL);
ok(hr == S_OK, "AddPort of default port failed: %08x\n", hr);
ok(hr == S_OK, "AddPort of default port failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(perf, 0, NULL, NULL, NULL);
ok(hr == S_OK, "PChannelInfo failed, got %08x\n", hr);
ok(hr == S_OK, "PChannelInfo failed, got %#lx\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(perf, 0, &port, NULL, NULL);
ok(hr == S_OK && port, "PChannelInfo failed, got %08x, %p\n", hr, port);
ok(hr == S_OK && port, "PChannelInfo failed, got %#lx, %p\n", hr, port);
for (i = 1; i < 16; i++) {
hr = IDirectMusicPerformance8_PChannelInfo(perf, i, &port2, &group, &channel);
ok(hr == S_OK && port == port2 && group == 1 && channel == i,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
"PChannelInfo failed, got %#lx, %p, %lu, %lu\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
}
/* Unset PChannels fail to retrieve */
hr = IDirectMusicPerformance8_PChannelInfo(perf, 16, &port2, NULL, NULL);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x, %p\n", hr, port);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %#lx, %p\n", hr, port);
hr = IDirectMusicPerformance8_PChannelInfo(perf, MAXDWORD - 16, &port2, NULL, NULL);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x, %p\n", hr, port);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %#lx, %p\n", hr, port);
/* Channel group 0 can be set just fine */
hr = IDirectMusicPerformance8_AssignPChannel(perf, 0, port, 0, 0);
ok(hr == S_OK, "AssignPChannel failed, got %08x\n", hr);
ok(hr == S_OK, "AssignPChannel failed, got %#lx\n", hr);
hr = IDirectMusicPerformance8_AssignPChannelBlock(perf, 0, port, 0);
ok(hr == S_OK, "AssignPChannelBlock failed, got %08x\n", hr);
ok(hr == S_OK, "AssignPChannelBlock failed, got %#lx\n", hr);
for (i = 1; i < 16; i++) {
hr = IDirectMusicPerformance8_PChannelInfo(perf, i, &port2, &group, &channel);
ok(hr == S_OK && port == port2 && group == 0 && channel == i,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
"PChannelInfo failed, got %#lx, %p, %lu, %lu\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
}
/* Last PChannel Block can be set only individually but not read */
hr = IDirectMusicPerformance8_AssignPChannel(perf, MAXDWORD, port, 0, 3);
ok(hr == S_OK, "AssignPChannel failed, got %08x\n", hr);
ok(hr == S_OK, "AssignPChannel failed, got %#lx\n", hr);
port2 = (IDirectMusicPort *)0xdeadbeef;
hr = IDirectMusicPerformance8_PChannelInfo(perf, MAXDWORD, &port2, NULL, NULL);
todo_wine ok(hr == E_INVALIDARG && port2 == (IDirectMusicPort *)0xdeadbeef,
"PChannelInfo failed, got %08x, %p\n", hr, port2);
"PChannelInfo failed, got %#lx, %p\n", hr, port2);
hr = IDirectMusicPerformance8_AssignPChannelBlock(perf, MAXDWORD, port, 0);
ok(hr == E_INVALIDARG, "AssignPChannelBlock failed, got %08x\n", hr);
ok(hr == E_INVALIDARG, "AssignPChannelBlock failed, got %#lx\n", hr);
hr = IDirectMusicPerformance8_AssignPChannelBlock(perf, MAXDWORD / 16, port, 1);
todo_wine ok(hr == E_INVALIDARG, "AssignPChannelBlock failed, got %08x\n", hr);
todo_wine ok(hr == E_INVALIDARG, "AssignPChannelBlock failed, got %#lx\n", hr);
for (i = MAXDWORD - 15; i < MAXDWORD; i++) {
hr = IDirectMusicPerformance8_AssignPChannel(perf, i, port, 0, 0);
ok(hr == S_OK, "AssignPChannel failed, got %08x\n", hr);
ok(hr == S_OK, "AssignPChannel failed, got %#lx\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(perf, i, &port2, NULL, NULL);
todo_wine ok(hr == E_INVALIDARG && port2 == (IDirectMusicPort *)0xdeadbeef,
"PChannelInfo failed, got %08x, %p\n", hr, port2);
"PChannelInfo failed, got %#lx, %p\n", hr, port2);
}
/* Second to last PChannel Block can be set only individually and read */
hr = IDirectMusicPerformance8_AssignPChannelBlock(perf, MAXDWORD / 16 - 1, port, 1);
todo_wine ok(hr == E_INVALIDARG, "AssignPChannelBlock failed, got %08x\n", hr);
todo_wine ok(hr == E_INVALIDARG, "AssignPChannelBlock failed, got %#lx\n", hr);
for (i = MAXDWORD - 31; i < MAXDWORD - 15; i++) {
hr = IDirectMusicPerformance8_AssignPChannel(perf, i, port, 1, 7);
ok(hr == S_OK, "AssignPChannel failed, got %08x\n", hr);
ok(hr == S_OK, "AssignPChannel failed, got %#lx\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(perf, i, &port2, &group, &channel);
ok(hr == S_OK && port2 == port && group == 1 && channel == 7,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
"PChannelInfo failed, got %#lx, %p, %lu, %lu\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
}
/* Third to last PChannel Block behaves normal */
hr = IDirectMusicPerformance8_AssignPChannelBlock(perf, MAXDWORD / 16 - 2, port, 0);
ok(hr == S_OK, "AssignPChannelBlock failed, got %08x\n", hr);
ok(hr == S_OK, "AssignPChannelBlock failed, got %#lx\n", hr);
for (i = MAXDWORD - 47; i < MAXDWORD - 31; i++) {
hr = IDirectMusicPerformance8_PChannelInfo(perf, i, &port2, &group, &channel);
ok(hr == S_OK && port2 == port && group == 0 && channel == i % 16,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
"PChannelInfo failed, got %#lx, %p, %lu, %lu\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
}
/* One PChannel set in a Block, rest is initialized too */
hr = IDirectMusicPerformance8_AssignPChannel(perf, 4711, port, 1, 13);
ok(hr == S_OK, "AssignPChannel failed, got %08x\n", hr);
ok(hr == S_OK, "AssignPChannel failed, got %#lx\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(perf, 4711, &port2, &group, &channel);
ok(hr == S_OK && port2 == port && group == 1 && channel == 13,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
"PChannelInfo failed, got %#lx, %p, %lu, %lu\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
group = channel = 0xdeadbeef;
hr = IDirectMusicPerformance8_PChannelInfo(perf, 4712, &port2, &group, &channel);
ok(hr == S_OK && port2 == port && group == 0 && channel == 8,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
"PChannelInfo failed, got %#lx, %p, %lu, %lu\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
group = channel = 0xdeadbeef;
hr = IDirectMusicPerformance8_PChannelInfo(perf, 4719, &port2, &group, &channel);
ok(hr == S_OK && port2 == port && group == 0 && channel == 15,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
"PChannelInfo failed, got %#lx, %p, %lu, %lu\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
IDirectMusicPort_Release(port);
......@@ -458,36 +458,35 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusicPerformance, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmp);
ok(hr == CLASS_E_NOAGGREGATION,
"DirectMusicPerformance create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
"DirectMusicPerformance create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmp, "dmp = %p\n", dmp);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmp);
ok(hr == E_NOINTERFACE,
"DirectMusicPerformance create failed: %08x, expected E_NOINTERFACE\n", hr);
ok(hr == E_NOINTERFACE, "DirectMusicPerformance create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount */
hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicPerformance, (void**)&dmp);
ok(hr == S_OK, "DirectMusicPerformance create failed: %08x, expected S_OK\n", hr);
ok(hr == S_OK, "DirectMusicPerformance create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicPerformance_AddRef(dmp);
ok (refcount == 2, "refcount == %u, expected 2\n", refcount);
ok (refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicPerformance_QueryInterface(dmp, &IID_IDirectMusicPerformance2, (void**)&dmp2);
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicPerformance2 failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicPerformance2 failed: %#lx\n", hr);
IDirectMusicPerformance_AddRef(dmp);
refcount = IDirectMusicPerformance_Release(dmp);
ok (refcount == 3, "refcount == %u, expected 3\n", refcount);
ok (refcount == 3, "refcount == %lu, expected 3\n", refcount);
hr = IDirectMusicPerformance_QueryInterface(dmp, &IID_IDirectMusicPerformance8, (void**)&dmp8);
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicPerformance8 failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicPerformance8 failed: %#lx\n", hr);
refcount = IDirectMusicPerformance_Release(dmp);
ok (refcount == 3, "refcount == %u, expected 3\n", refcount);
ok (refcount == 3, "refcount == %lu, expected 3\n", refcount);
refcount = IDirectMusicPerformance8_Release(dmp8);
ok (refcount == 2, "refcount == %u, expected 2\n", refcount);
ok (refcount == 2, "refcount == %lu, expected 2\n", refcount);
refcount = IDirectMusicPerformance_Release(dmp2);
ok (refcount == 1, "refcount == %u, expected 1\n", refcount);
ok (refcount == 1, "refcount == %lu, expected 1\n", refcount);
refcount = IDirectMusicPerformance_Release(dmp);
ok (refcount == 0, "refcount == %u, expected 0\n", refcount);
ok (refcount == 0, "refcount == %lu, expected 0\n", refcount);
}
static void test_notification_type(void)
......@@ -513,25 +512,25 @@ static void test_notification_type(void)
hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL,
CLSCTX_INPROC_SERVER, &IID_IDirectMusicPerformance8, (void**)&perf);
ok(hr == S_OK, "CoCreateInstance failed: %08x\n", hr);
ok(hr == S_OK, "CoCreateInstance failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_InitAudio(perf, &music, &dsound, NULL, DMUS_APATH_DYNAMIC_STEREO, 64, DMUS_AUDIOF_ALL, NULL);
ok(music != NULL, "Didn't get IDirectMusic pointer\n");
ok(dsound != NULL, "Didn't get IDirectSound pointer\n");
hr = CoCreateInstance(&CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicLoader8, (void**)&loader);
ok(hr == S_OK, "CoCreateInstance failed: %08x\n", hr);
ok(hr == S_OK, "CoCreateInstance failed: %#lx\n", hr);
messages = CreateEventA( NULL, FALSE, FALSE, NULL );
hr = IDirectMusicPerformance8_AddNotificationType(perf, &GUID_NOTIFICATION_SEGMENT);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_SetNotificationHandle(perf, messages, 0);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_GetDefaultAudioPath(perf, &path);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
ok(path != NULL, "Didn't get IDirectMusicAudioPath pointer\n");
desc.dwSize = sizeof(DMUS_OBJECTDESC);
......@@ -540,31 +539,31 @@ static void test_notification_type(void)
desc.pbMemData = rifffile;
desc.llMemLength = sizeof(rifffile);
hr = IDirectMusicLoader8_GetObject(loader, &desc, &IID_IDirectMusicSegment8, (void**)&prime_segment8);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
ok(prime_segment8 != NULL, "Didn't get IDirectMusicSegment pointer\n");
hr = IDirectMusicSegment8_Download(prime_segment8, (IUnknown*)path);
ok(hr == S_OK, "Download failed: %08x\n", hr);
ok(hr == S_OK, "Download failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_PlaySegmentEx(perf, (IUnknown*)prime_segment8,
NULL, NULL, DMUS_SEGF_SECONDARY, 0, &state, NULL, (IUnknown*)path);
ok(hr == S_OK, "PlaySegmentEx failed: %08x\n", hr);
ok(hr == S_OK, "PlaySegmentEx failed: %#lx\n", hr);
ok(state != NULL, "Didn't get IDirectMusicSegmentState pointer\n");
while (!found_end) {
result = WaitForSingleObject(messages, 500);
todo_wine ok(result == WAIT_OBJECT_0, "Failed: %d\n", result);
todo_wine ok(result == WAIT_OBJECT_0, "Failed: %ld\n", result);
if (result != WAIT_OBJECT_0)
break;
msg = NULL;
hr = IDirectMusicPerformance8_GetNotificationPMsg(perf, &msg);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
ok(msg != NULL, "Unexpected NULL pointer\n");
if (FAILED(hr) || !msg)
break;
trace("Notification: %d\n", msg->dwNotificationOption);
trace("Notification: %ld\n", msg->dwNotificationOption);
if (msg->dwNotificationOption == DMUS_NOTIFICATION_SEGEND ||
msg->dwNotificationOption == DMUS_NOTIFICATION_SEGALMOSTEND) {
......@@ -574,17 +573,17 @@ static void test_notification_type(void)
IDirectMusicSegment *segment;
hr = IUnknown_QueryInterface(msg->punkUser, &IID_IDirectMusicSegmentState8, (void**)&segmentstate);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
hr = IDirectMusicSegmentState8_GetSegment(segmentstate, &segment);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
if (FAILED(hr)) {
IDirectMusicSegmentState8_Release(segmentstate);
break;
}
hr = IDirectMusicSegment_QueryInterface(segment, &IID_IDirectMusicSegment8, (void**)&segment8);
ok(hr == S_OK, "Failed: %08x\n", hr);
ok(hr == S_OK, "Failed: %#lx\n", hr);
found_end = TRUE;
......@@ -618,17 +617,17 @@ static void test_performance_graph(void)
create_performance(&perf, NULL, NULL, FALSE);
hr = IDirectMusicPerformance8_Init(perf, NULL, NULL, NULL);
ok(hr == S_OK, "Init failed: %08x\n", hr);
ok(hr == S_OK, "Init failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_GetGraph(perf, NULL);
ok(hr == E_POINTER, "Failed: %08x\n", hr);
ok(hr == E_POINTER, "Failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_GetGraph(perf, &graph2);
ok(hr == DMUS_E_NOT_FOUND, "Failed: %08x\n", hr);
ok(hr == DMUS_E_NOT_FOUND, "Failed: %#lx\n", hr);
ok(graph2 == NULL, "unexpected pointer.\n");
hr = IDirectMusicPerformance8_QueryInterface(perf, &IID_IDirectMusicGraph, (void**)&graph);
todo_wine ok(hr == S_OK, "Failed: %08x\n", hr);
todo_wine ok(hr == S_OK, "Failed: %#lx\n", hr);
if (graph)
IDirectMusicGraph_Release(graph);
......@@ -641,13 +640,13 @@ START_TEST( performance )
hr = CoInitialize(NULL);
if (FAILED(hr)) {
skip("Cannot initialize COM (%x)\n", hr);
skip("Cannot initialize COM (%lx)\n", hr);
return;
}
hr = test_InitAudio();
if (hr != S_OK) {
skip("InitAudio failed (%x)\n", hr);
skip("InitAudio failed (%lx)\n", hr);
return;
}
......
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