Fix capture test to not fail when IDirectSoundCapture class is not

registered.
This commit is contained in:
Robert Reif 2005-09-23 10:05:40 +00:00 committed by Alexandre Julliard
parent 67f83ba7e5
commit 594b7f26e4
1 changed files with 5 additions and 1 deletions

View File

@ -196,8 +196,12 @@ static void IDirectSoundCapture_tests(void)
/* try the COM class factory method of creation with no device specified */ /* try the COM class factory method of creation with no device specified */
rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectSoundCapture, (void**)&dsco); &IID_IDirectSoundCapture, (void**)&dsco);
ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %s\n", ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (rc==REGDB_E_CLASSNOTREG) {
trace(" Class Not Registered\n");
return;
}
if (dsco) if (dsco)
IDirectSoundCapture_test(dsco, FALSE, NULL); IDirectSoundCapture_test(dsco, FALSE, NULL);