[DSOUND] fix capture test when IDirectSoundCapture class not registered

Robert Reif reif at earthlink.net
Thu Sep 22 06:42:37 CDT 2005


Fix capture test to not fail when IDirectSoundCapture class is not 
registered.
-------------- next part --------------
Index: dlls/dsound/tests/capture.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/capture.c,v
retrieving revision 1.24
diff -p -u -r1.24 capture.c
--- dlls/dsound/tests/capture.c	21 Jun 2005 20:53:14 -0000	1.24
+++ dlls/dsound/tests/capture.c	22 Sep 2005 11:37:24 -0000
@@ -196,8 +196,12 @@ static void IDirectSoundCapture_tests(vo
     /* try the COM class factory method of creation with no device specified */
     rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER,
                         &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));
+    if (rc==REGDB_E_CLASSNOTREG) {
+        trace("  Class Not Registered\n");
+        return;
+    }
     if (dsco)
         IDirectSoundCapture_test(dsco, FALSE, NULL);
 


More information about the wine-patches mailing list