dmusic/tests: Change the way of detecting a workable dmusic.
This commit is contained in:
parent
bf1a43e620
commit
393135c3c7
|
@ -323,10 +323,15 @@ static void test_COM_dmcoll(void)
|
||||||
static BOOL missing_dmusic(void)
|
static BOOL missing_dmusic(void)
|
||||||
{
|
{
|
||||||
IDirectMusic8 *dm;
|
IDirectMusic8 *dm;
|
||||||
HRESULT hr = CoCreateInstance(&CLSID_DirectMusic, (IUnknown*)&dm, CLSCTX_INPROC_SERVER,
|
HRESULT hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic,
|
||||||
&IID_IUnknown, (void**)&dm);
|
(void**)&dm);
|
||||||
|
|
||||||
return (hr == REGDB_E_CLASSNOTREG || hr == CLASS_E_CLASSNOTAVAILABLE);
|
if (hr == S_OK && dm)
|
||||||
|
{
|
||||||
|
IDirectMusic_Release(dm);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(dmusic)
|
START_TEST(dmusic)
|
||||||
|
|
Loading…
Reference in New Issue