dmcompos/tests: Build without -DWINE_NO_LONG_TYPES.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2022-02-09 23:34:05 +01:00 committed by Alexandre Julliard
parent ebe67a8f5b
commit a49e82639b
2 changed files with 101 additions and 105 deletions

View File

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmcompos.dll TESTDLL = dmcompos.dll
IMPORTS = ole32 IMPORTS = ole32

View File

@ -53,26 +53,25 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusicComposer, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicComposer, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmc); &IID_IUnknown, (void**)&dmc);
ok(hr == CLASS_E_NOAGGREGATION, ok(hr == CLASS_E_NOAGGREGATION,
"DirectMusicComposer create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); "DirectMusicComposer create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmc, "dmc = %p\n", dmc); ok(!dmc, "dmc = %p\n", dmc);
/* Invalid RIID */ /* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicComposer, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicComposer, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmc); &IID_IDirectMusicObject, (void**)&dmc);
ok(hr == E_NOINTERFACE, ok(hr == E_NOINTERFACE, "DirectMusicComposer create failed: %#lx, expected E_NOINTERFACE\n", hr);
"DirectMusicComposer create failed: %08x, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicComposer interfaces */ /* Same refcount for all DirectMusicComposer interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicComposer, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicComposer, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicComposer, (void**)&dmc); &IID_IDirectMusicComposer, (void**)&dmc);
ok(hr == S_OK, "DirectMusicComposer create failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "DirectMusicComposer create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicComposer_AddRef(dmc); refcount = IDirectMusicComposer_AddRef(dmc);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount); ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicComposer_QueryInterface(dmc, &IID_IUnknown, (void**)&unk); hr = IDirectMusicComposer_QueryInterface(dmc, &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); 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); refcount = IUnknown_Release(unk);
while (IDirectMusicComposer_Release(dmc)); while (IDirectMusicComposer_Release(dmc));
@ -91,38 +90,37 @@ static void test_COM_chordmap(void)
hr = CoCreateInstance(&CLSID_DirectMusicChordMap, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicChordMap, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmcm); &IID_IUnknown, (void**)&dmcm);
ok(hr == CLASS_E_NOAGGREGATION, ok(hr == CLASS_E_NOAGGREGATION,
"DirectMusicChordMap create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); "DirectMusicChordMap create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmcm, "dmcm = %p\n", dmcm); ok(!dmcm, "dmcm = %p\n", dmcm);
/* Invalid RIID */ /* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER,
&IID_IClassFactory, (void**)&dmcm); &IID_IClassFactory, (void**)&dmcm);
ok(hr == E_NOINTERFACE, ok(hr == E_NOINTERFACE, "DirectMusicChordMap create failed: %#lx, expected E_NOINTERFACE\n", hr);
"DirectMusicChordMap create failed: %08x, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicChordMap interfaces */ /* Same refcount for all DirectMusicChordMap interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicChordMap, (void**)&dmcm); &IID_IDirectMusicChordMap, (void**)&dmcm);
ok(hr == S_OK, "DirectMusicChordMap create failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "DirectMusicChordMap create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicChordMap_AddRef(dmcm); refcount = IDirectMusicChordMap_AddRef(dmcm);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount); ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicChordMap_QueryInterface(dmcm, &IID_IDirectMusicObject, (void**)&dmo); hr = IDirectMusicChordMap_QueryInterface(dmcm, &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);
refcount = IDirectMusicObject_AddRef(dmo); 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); refcount = IDirectMusicObject_Release(dmo);
hr = IDirectMusicChordMap_QueryInterface(dmcm, &IID_IPersistStream, (void**)&ps); hr = IDirectMusicChordMap_QueryInterface(dmcm, &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); 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); refcount = IPersistStream_Release(ps);
hr = IDirectMusicChordMap_QueryInterface(dmcm, &IID_IUnknown, (void**)&unk); hr = IDirectMusicChordMap_QueryInterface(dmcm, &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); 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); refcount = IUnknown_Release(unk);
while (IDirectMusicChordMap_Release(dmcm)); while (IDirectMusicChordMap_Release(dmcm));
@ -139,30 +137,30 @@ static void test_COM_template(void)
hr = CoCreateInstance(&CLSID_DirectMusicTemplate, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicTemplate, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&ps); &IID_IUnknown, (void**)&ps);
ok(hr == CLASS_E_NOAGGREGATION, ok(hr == CLASS_E_NOAGGREGATION,
"DirectMusicTemplate create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); "DirectMusicTemplate create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!ps, "ps = %p\n", ps); ok(!ps, "ps = %p\n", ps);
/* Invalid RIID */ /* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicTemplate, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicTemplate, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&ps); &IID_IDirectMusicObject, (void**)&ps);
todo_wine ok(hr == E_NOINTERFACE, todo_wine ok(hr == E_NOINTERFACE,
"DirectMusicTemplate create failed: %08x, expected E_NOINTERFACE\n", hr); "DirectMusicTemplate create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicTemplate interfaces */ /* Same refcount for all DirectMusicTemplate interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicTemplate, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicTemplate, NULL, CLSCTX_INPROC_SERVER,
&IID_IPersistStream, (void**)&ps); &IID_IPersistStream, (void**)&ps);
todo_wine ok(hr == S_OK, "DirectMusicTemplate create failed: %08x, expected S_OK\n", hr); todo_wine ok(hr == S_OK, "DirectMusicTemplate create failed: %#lx, expected S_OK\n", hr);
if (hr != S_OK) { if (hr != S_OK) {
skip("DirectMusicTemplate not implemented\n"); skip("DirectMusicTemplate not implemented\n");
return; return;
} }
refcount = IPersistStream_AddRef(ps); refcount = IPersistStream_AddRef(ps);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount); ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IPersistStream_QueryInterface(ps, &IID_IUnknown, (void**)&unk); hr = IPersistStream_QueryInterface(ps, &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); 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); refcount = IUnknown_Release(unk);
while (IPersistStream_Release(ps)); while (IPersistStream_Release(ps));
@ -196,14 +194,13 @@ static void test_COM_track(void)
continue; continue;
} }
ok(hr == CLASS_E_NOAGGREGATION, 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); ok(!dmt8, "dmt8 = %p\n", dmt8);
/* Invalid RIID */ /* Invalid RIID */
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject, hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject,
(void**)&dmt8); (void**)&dmt8);
ok(hr == E_NOINTERFACE, "%s create failed: %08x, expected E_NOINTERFACE\n", ok(hr == E_NOINTERFACE, "%s create failed: %#lx, expected E_NOINTERFACE\n", class[i].name, hr);
class[i].name, hr);
/* Same refcount for all DirectMusicTrack interfaces */ /* Same refcount for all DirectMusicTrack interfaces */
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack8, hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack8,
@ -212,20 +209,20 @@ static void test_COM_track(void)
skip("%s not created with CoCreateInstance()\n", class[i].name); skip("%s not created with CoCreateInstance()\n", class[i].name);
continue; continue;
} }
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 = IDirectMusicTrack8_AddRef(dmt8); refcount = IDirectMusicTrack8_AddRef(dmt8);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount); ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IPersistStream, (void**)&ps); hr = IDirectMusicTrack8_QueryInterface(dmt8, &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); 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); IPersistStream_Release(ps);
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IUnknown, (void**)&unk); hr = IDirectMusicTrack8_QueryInterface(dmt8, &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); 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); refcount = IUnknown_Release(unk);
while (IDirectMusicTrack8_Release(dmt8)); while (IDirectMusicTrack8_Release(dmt8));
@ -242,23 +239,23 @@ static void test_chordmap(void)
hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicChordMap, (void**)&dmcm); &IID_IDirectMusicChordMap, (void**)&dmcm);
ok(hr == S_OK, "DirectMusicChordMap create failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "DirectMusicChordMap create failed: %#lx, expected S_OK\n", hr);
/* IPersistStream */ /* IPersistStream */
hr = IDirectMusicChordMap_QueryInterface(dmcm, &IID_IPersistStream, (void**)&ps); hr = IDirectMusicChordMap_QueryInterface(dmcm, &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); 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_DirectMusicChordMap), ok(IsEqualGUID(&class, &CLSID_DirectMusicChordMap),
"Expected class CLSID_DirectMusicChordMap got %s\n", wine_dbgstr_guid(&class)); "Expected class CLSID_DirectMusicChordMap got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods */ /* Unimplemented IPersistStream methods */
hr = IPersistStream_IsDirty(ps); hr = IPersistStream_IsDirty(ps);
ok(hr == S_FALSE || broken(hr == S_OK), "IPersistStream_IsDirty failed: %08x\n", hr); ok(hr == S_FALSE || broken(hr == S_OK), "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size); 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); 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 (IDirectMusicChordMap_Release(dmcm)); while (IDirectMusicChordMap_Release(dmcm));
} }
@ -310,85 +307,85 @@ static void test_chordmaptrack(void)
hr = CoCreateInstance(&CLSID_DirectMusicChordMapTrack, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicChordMapTrack, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicTrack8, (void**)&dmt8); &IID_IDirectMusicTrack8, (void**)&dmt8);
ok(hr == S_OK, "DirectMusicChordMapTrack create failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "DirectMusicChordMapTrack create failed: %#lx, expected S_OK\n", hr);
/* IDirectMusicTrack8 */ /* IDirectMusicTrack8 */
hr = IDirectMusicTrack8_Init(dmt8, NULL); hr = IDirectMusicTrack8_Init(dmt8, NULL);
ok(hr == S_OK, "IDirectMusicTrack8_Init failed: %08x\n", hr); ok(hr == S_OK, "IDirectMusicTrack8_Init failed: %#lx\n", hr);
hr = IDirectMusicTrack8_InitPlay(dmt8, NULL, NULL, NULL, 0, 0); hr = IDirectMusicTrack8_InitPlay(dmt8, NULL, NULL, NULL, 0, 0);
ok(hr == S_OK, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr); ok(hr == S_OK, "IDirectMusicTrack8_InitPlay failed: %#lx\n", hr);
hr = IDirectMusicTrack8_EndPlay(dmt8, NULL); hr = IDirectMusicTrack8_EndPlay(dmt8, NULL);
ok(hr == S_OK, "IDirectMusicTrack8_EndPlay failed: %08x\n", hr); ok(hr == S_OK, "IDirectMusicTrack8_EndPlay failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Play(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0); hr = IDirectMusicTrack8_Play(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
ok(hr == S_OK, "IDirectMusicTrack8_Play failed: %08x\n", hr); ok(hr == S_OK, "IDirectMusicTrack8_Play failed: %#lx\n", hr);
hr = IDirectMusicTrack8_GetParam(dmt8, NULL, 0, NULL, NULL); hr = IDirectMusicTrack8_GetParam(dmt8, NULL, 0, NULL, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack8_SetParam(dmt8, NULL, 0, NULL); hr = IDirectMusicTrack8_SetParam(dmt8, NULL, 0, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL); hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %#lx\n", hr);
hr = IDirectMusicTrack8_IsParamSupported(dmt8, &GUID_IDirectMusicChordMap); hr = IDirectMusicTrack8_IsParamSupported(dmt8, &GUID_IDirectMusicChordMap);
ok(hr == S_OK, "IsParamSupported(GUID_IDirectMusicChordMap) failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "IsParamSupported(GUID_IDirectMusicChordMap) failed: %#lx, expected S_OK\n", hr);
hr = IDirectMusicTrack8_GetParam(dmt8, &GUID_IDirectMusicChordMap, 0, NULL, &chordmap); hr = IDirectMusicTrack8_GetParam(dmt8, &GUID_IDirectMusicChordMap, 0, NULL, &chordmap);
todo_wine ok(hr == DMUS_E_NOT_FOUND, todo_wine ok(hr == DMUS_E_NOT_FOUND,
"GetParam(GUID_IDirectMusicChordMap) failed: %08x, expected DMUS_E_NOT_FOUND\n", hr); "GetParam(GUID_IDirectMusicChordMap) failed: %#lx, expected DMUS_E_NOT_FOUND\n", hr);
hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicChordMap, (void **)&chordmap); &IID_IDirectMusicChordMap, (void **)&chordmap);
ok(hr == S_OK, "DirectMusicChordMap create failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "DirectMusicChordMap create failed: %#lx, expected S_OK\n", hr);
hr = IDirectMusicTrack8_SetParam(dmt8, &GUID_IDirectMusicChordMap, 0, chordmap); hr = IDirectMusicTrack8_SetParam(dmt8, &GUID_IDirectMusicChordMap, 0, chordmap);
ok(hr == S_OK, "SetParam(GUID_IDirectMusicChordMap) failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "SetParam(GUID_IDirectMusicChordMap) failed: %#lx, expected S_OK\n", hr);
IDirectMusicChordMap_Release(chordmap); IDirectMusicChordMap_Release(chordmap);
for (i = 0; i < ARRAY_SIZE(unsupported); i++) { for (i = 0; i < ARRAY_SIZE(unsupported); i++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt8, unsupported[i].type); hr = IDirectMusicTrack8_IsParamSupported(dmt8, unsupported[i].type);
ok(hr == DMUS_E_TYPE_UNSUPPORTED, 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",
unsupported[i].name, hr); unsupported[i].name, hr);
hr = IDirectMusicTrack8_GetParam(dmt8, unsupported[i].type, 0, NULL, &chordmap); hr = IDirectMusicTrack8_GetParam(dmt8, unsupported[i].type, 0, NULL, &chordmap);
ok(hr == DMUS_E_GET_UNSUPPORTED, ok(hr == DMUS_E_GET_UNSUPPORTED,
"GetParam(%s) failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n", "GetParam(%s) failed: %#lx, expected DMUS_E_GET_UNSUPPORTED\n",
unsupported[i].name, hr); unsupported[i].name, hr);
hr = IDirectMusicTrack8_SetParam(dmt8, unsupported[i].type, 0, chordmap); hr = IDirectMusicTrack8_SetParam(dmt8, unsupported[i].type, 0, chordmap);
ok(hr == DMUS_E_SET_UNSUPPORTED, ok(hr == DMUS_E_SET_UNSUPPORTED,
"SetParam(%s) failed: %08x, expected DMUS_E_SET_UNSUPPORTED\n", "SetParam(%s) failed: %#lx, expected DMUS_E_SET_UNSUPPORTED\n",
unsupported[i].name, hr); unsupported[i].name, hr);
} }
hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL); hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", hr); ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_RemoveNotificationType(dmt8, NULL); hr = IDirectMusicTrack8_RemoveNotificationType(dmt8, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %08x\n", hr); ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %#lx\n", hr);
todo_wine { todo_wine {
hr = IDirectMusicTrack8_Clone(dmt8, 0, 0, NULL); hr = IDirectMusicTrack8_Clone(dmt8, 0, 0, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %#lx\n", hr);
hr = IDirectMusicTrack8_PlayEx(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0); hr = IDirectMusicTrack8_PlayEx(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %#lx\n", hr);
hr = IDirectMusicTrack8_GetParamEx(dmt8, NULL, 0, NULL, NULL, NULL, 0); hr = IDirectMusicTrack8_GetParamEx(dmt8, NULL, 0, NULL, NULL, NULL, 0);
ok(hr == E_POINTER, "IDirectMusicTrack8_GetParamEx failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_GetParamEx failed: %#lx\n", hr);
hr = IDirectMusicTrack8_SetParamEx(dmt8, NULL, 0, NULL, NULL, 0); hr = IDirectMusicTrack8_SetParamEx(dmt8, NULL, 0, NULL, NULL, 0);
ok(hr == E_POINTER, "IDirectMusicTrack8_SetParamEx failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_SetParamEx failed: %#lx\n", hr);
} }
hr = IDirectMusicTrack8_Compose(dmt8, NULL, 0, NULL); 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); hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL);
todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %08x\n", hr); todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
/* IPersistStream */ /* IPersistStream */
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IPersistStream, (void**)&ps); hr = IDirectMusicTrack8_QueryInterface(dmt8, &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); 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_DirectMusicChordMapTrack), ok(IsEqualGUID(&class, &CLSID_DirectMusicChordMapTrack),
"Expected class CLSID_DirectMusicChordMapTrack got %s\n", wine_dbgstr_guid(&class)); "Expected class CLSID_DirectMusicChordMapTrack got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods */ /* Unimplemented IPersistStream methods */
hr = IPersistStream_IsDirty(ps); 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); 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); 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 (IDirectMusicTrack8_Release(dmt8)); while (IDirectMusicTrack8_Release(dmt8));
} }
@ -403,62 +400,62 @@ static void test_signposttrack(void)
hr = CoCreateInstance(&CLSID_DirectMusicSignPostTrack, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicSignPostTrack, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicTrack8, (void**)&dmt8); &IID_IDirectMusicTrack8, (void**)&dmt8);
ok(hr == S_OK, "DirectMusicSignPostTrack create failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "DirectMusicSignPostTrack create failed: %#lx, expected S_OK\n", hr);
/* IDirectMusicTrack8 */ /* IDirectMusicTrack8 */
hr = IDirectMusicTrack8_Init(dmt8, NULL); hr = IDirectMusicTrack8_Init(dmt8, NULL);
ok(hr == S_OK, "IDirectMusicTrack8_Init failed: %08x\n", hr); ok(hr == S_OK, "IDirectMusicTrack8_Init failed: %#lx\n", hr);
if (0) { if (0) {
/* Crashes on Windows */ /* Crashes on Windows */
hr = IDirectMusicTrack8_InitPlay(dmt8, NULL, NULL, NULL, 0, 0); hr = IDirectMusicTrack8_InitPlay(dmt8, NULL, NULL, NULL, 0, 0);
ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %#lx\n", hr);
} }
hr = IDirectMusicTrack8_EndPlay(dmt8, NULL); hr = IDirectMusicTrack8_EndPlay(dmt8, NULL);
ok(hr == S_OK, "IDirectMusicTrack8_EndPlay failed: %08x\n", hr); ok(hr == S_OK, "IDirectMusicTrack8_EndPlay failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Play(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0); hr = IDirectMusicTrack8_Play(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
ok(hr == S_OK, "IDirectMusicTrack8_Play failed: %08x\n", hr); ok(hr == S_OK, "IDirectMusicTrack8_Play failed: %#lx\n", hr);
hr = IDirectMusicTrack8_GetParam(dmt8, NULL, 0, NULL, NULL); hr = IDirectMusicTrack8_GetParam(dmt8, NULL, 0, NULL, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_GetParam failed: %08x\n", hr); ok(hr == E_NOTIMPL, "IDirectMusicTrack8_GetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack8_SetParam(dmt8, NULL, 0, NULL); hr = IDirectMusicTrack8_SetParam(dmt8, NULL, 0, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_SetParam failed: %08x\n", hr); ok(hr == E_NOTIMPL, "IDirectMusicTrack8_SetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL); hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_IsParamSupported failed: %08x\n", hr); ok(hr == E_NOTIMPL, "IDirectMusicTrack8_IsParamSupported failed: %#lx\n", hr);
todo_wine { todo_wine {
hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL); hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_AddNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_RemoveNotificationType(dmt8, NULL); hr = IDirectMusicTrack8_RemoveNotificationType(dmt8, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_RemoveNotificationType failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_RemoveNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Clone(dmt8, 0, 0, NULL); hr = IDirectMusicTrack8_Clone(dmt8, 0, 0, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %#lx\n", hr);
hr = IDirectMusicTrack8_PlayEx(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0); hr = IDirectMusicTrack8_PlayEx(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %#lx\n", hr);
} }
hr = IDirectMusicTrack8_GetParamEx(dmt8, NULL, 0, NULL, NULL, NULL, 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); 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);
todo_wine { todo_wine {
hr = IDirectMusicTrack8_Compose(dmt8, NULL, 0, NULL); hr = IDirectMusicTrack8_Compose(dmt8, NULL, 0, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_Compose failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_Compose failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL); hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL);
ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %08x\n", hr); ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
} }
/* IPersistStream */ /* IPersistStream */
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IPersistStream, (void**)&ps); hr = IDirectMusicTrack8_QueryInterface(dmt8, &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); 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_DirectMusicSignPostTrack), ok(IsEqualGUID(&class, &CLSID_DirectMusicSignPostTrack),
"Expected class CLSID_DirectMusicSignPostTrack got %s\n", wine_dbgstr_guid(&class)); "Expected class CLSID_DirectMusicSignPostTrack got %s\n", wine_dbgstr_guid(&class));
hr = IPersistStream_Save(ps, NULL, TRUE); hr = IPersistStream_Save(ps, NULL, TRUE);
ok(hr == E_POINTER, "IPersistStream_Save failed: %08x\n", hr); ok(hr == E_POINTER, "IPersistStream_Save failed: %#lx\n", hr);
/* Unimplemented IPersistStream methods */ /* Unimplemented IPersistStream methods */
hr = IPersistStream_IsDirty(ps); 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); 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);
while (IDirectMusicTrack8_Release(dmt8)); while (IDirectMusicTrack8_Release(dmt8));
} }
@ -570,12 +567,12 @@ static void test_parsedescriptor(void)
hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_DirectMusicChordMap, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void **)&dmo); &IID_IDirectMusicObject, (void **)&dmo);
ok(hr == S_OK, "DirectMusicChordMap create failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "DirectMusicChordMap create failed: %#lx, expected S_OK\n", hr);
/* Nothing loaded */ /* Nothing loaded */
hr = IDirectMusicObject_GetDescriptor(dmo, &desc); hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr); ok(hr == S_OK, "GetDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_OBJECT\n", ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_OBJECT\n",
desc.dwValidData); desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicChordMap), ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicChordMap),
"Got class guid %s, expected CLSID_DirectMusicChordMap\n", "Got class guid %s, expected CLSID_DirectMusicChordMap\n",
@ -585,8 +582,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(empty); stream = gen_riff_stream(empty);
memset(&desc, 0, sizeof(desc)); memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &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);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n", ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData); desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicChordMap), ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicChordMap),
"Got class guid %s, expected CLSID_DirectMusicChordMap\n", "Got class guid %s, expected CLSID_DirectMusicChordMap\n",
@ -596,25 +593,25 @@ static void test_parsedescriptor(void)
/* NULL pointers */ /* NULL pointers */
memset(&desc, 0, sizeof(desc)); memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, &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); hr = IDirectMusicObject_ParseDescriptor(dmo, stream, 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);
/* Wrong form */ /* Wrong form */
empty[1] = DMUS_FOURCC_CONTAINER_FORM; empty[1] = DMUS_FOURCC_CONTAINER_FORM;
stream = gen_riff_stream(empty); stream = gen_riff_stream(empty);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc); hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == DMUS_E_CHUNKNOTFOUND, ok(hr == DMUS_E_CHUNKNOTFOUND,
"ParseDescriptor failed: %08x, expected DMUS_E_CHUNKNOTFOUND\n", hr); "ParseDescriptor failed: %#lx, expected DMUS_E_CHUNKNOTFOUND\n", hr);
IStream_Release(stream); IStream_Release(stream);
/* All desc chunks, only DMUS_OBJ_OBJECT and DMUS_OBJ_CLASS supported */ /* All desc chunks, only DMUS_OBJ_OBJECT and DMUS_OBJ_CLASS supported */
stream = gen_riff_stream(alldesc); stream = gen_riff_stream(alldesc);
memset(&desc, 0, sizeof(desc)); memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &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);
ok(desc.dwValidData == (DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS), ok(desc.dwValidData == (DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS),
"Got valid data %#x, expected DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS\n", desc.dwValidData); "Got valid data %#lx, expected DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS\n", desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicChordMap), ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicChordMap),
"Got class guid %s, expected CLSID_DirectMusicChordMap\n", "Got class guid %s, expected CLSID_DirectMusicChordMap\n",
wine_dbgstr_guid(&desc.guidClass)); wine_dbgstr_guid(&desc.guidClass));
@ -627,8 +624,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam); stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc)); memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &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);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n", ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData); desc.dwValidData);
IStream_Release(stream); IStream_Release(stream);
@ -637,8 +634,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam); stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc)); memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &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);
ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n", ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData); desc.dwValidData);
IStream_Release(stream); IStream_Release(stream);
@ -646,9 +643,9 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(dupes); stream = gen_riff_stream(dupes);
memset(&desc, 0, sizeof(desc)); memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &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);
ok(desc.dwValidData == (DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS), ok(desc.dwValidData == (DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS),
"Got valid data %#x, expected DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS\n", desc.dwValidData); "Got valid data %#lx, expected DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS\n", desc.dwValidData);
IStream_Release(stream); IStream_Release(stream);
IDirectMusicObject_Release(dmo); IDirectMusicObject_Release(dmo);