diff --git a/dlls/dsound/tests/capture.c b/dlls/dsound/tests/capture.c index 5185e4eb9f..8ed8aa2faf 100644 --- a/dlls/dsound/tests/capture.c +++ b/dlls/dsound/tests/capture.c @@ -192,9 +192,20 @@ static void IDirectSoundCapture_tests(void) { HRESULT rc; LPDIRECTSOUNDCAPTURE dsco=NULL; + LPCLASSFACTORY cf=NULL; trace("Testing IDirectSoundCapture\n"); + rc=CoGetClassObject(&CLSID_DirectSoundCapture, CLSCTX_INPROC_SERVER, NULL, + &IID_IClassFactory, (void**)&cf); + ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSoundCapture, IID_IClassFactory) " + "failed: %s\n", DXGetErrorString8(rc)); + + rc=CoGetClassObject(&CLSID_DirectSoundCapture, CLSCTX_INPROC_SERVER, NULL, + &IID_IUnknown, (void**)&cf); + ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSoundCapture, IID_IUnknown) " + "failed: %s\n", DXGetErrorString8(rc)); + /* try the COM class factory method of creation with no device specified */ rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundCapture, (void**)&dsco); diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c index 5d4845ce54..6163484f82 100644 --- a/dlls/dsound/tests/dsound.c +++ b/dlls/dsound/tests/dsound.c @@ -172,9 +172,20 @@ static void IDirectSound_tests(void) { HRESULT rc; LPDIRECTSOUND dso=NULL; + LPCLASSFACTORY cf=NULL; trace("Testing IDirectSound\n"); + rc=CoGetClassObject(&CLSID_DirectSound, CLSCTX_INPROC_SERVER, NULL, + &IID_IClassFactory, (void**)&cf); + ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound, IID_IClassFactory) " + "failed: %s\n", DXGetErrorString8(rc)); + + rc=CoGetClassObject(&CLSID_DirectSound, CLSCTX_INPROC_SERVER, NULL, + &IID_IUnknown, (void**)&cf); + ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound, IID_IUnknown) " + "failed: %s\n", DXGetErrorString8(rc)); + /* try the COM class factory method of creation with no device specified */ rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound, (void**)&dso); diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index e207a9e2a5..af90ac672a 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -191,9 +191,20 @@ static void IDirectSound8_tests(void) { HRESULT rc; LPDIRECTSOUND8 dso=NULL; + LPCLASSFACTORY cf=NULL; trace("Testing IDirectSound8\n"); + rc=CoGetClassObject(&CLSID_DirectSound8, CLSCTX_INPROC_SERVER, NULL, + &IID_IClassFactory, (void**)&cf); + ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound8, IID_IClassFactory) " + "failed: %s\n", DXGetErrorString8(rc)); + + rc=CoGetClassObject(&CLSID_DirectSound8, CLSCTX_INPROC_SERVER, NULL, + &IID_IUnknown, (void**)&cf); + ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound8, IID_IUnknown) " + "failed: %s\n", DXGetErrorString8(rc)); + /* try the COM class factory method of creation with no device specified */ rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound8, (void**)&dso); diff --git a/dlls/dsound/tests/duplex.c b/dlls/dsound/tests/duplex.c index 2b23833592..e4095c1275 100644 --- a/dlls/dsound/tests/duplex.c +++ b/dlls/dsound/tests/duplex.c @@ -66,7 +66,7 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo, ok(ref==0, "IDirectSound_Release() has %d references, " "should have 0\n", ref); } - + rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IDirectSound8,(LPVOID*)&ds8); ok(rc==(initialized?DS_OK:E_NOINTERFACE),"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSound8) " "failed: %s\n",DXGetErrorString8(rc)); @@ -136,7 +136,7 @@ static void IDirectSoundFullDuplex_tests(void) if (dsfdo) IDirectSoundFullDuplex_test(dsfdo, FALSE, NULL, NULL); - /* try the COM class factory method of creation with default devices + /* try the COM class factory method of creation with default devices * specified */ rc=CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex, diff --git a/dlls/dsound/tests/propset.c b/dlls/dsound/tests/propset.c index 766b338666..2c11afa23b 100644 --- a/dlls/dsound/tests/propset.c +++ b/dlls/dsound/tests/propset.c @@ -202,6 +202,15 @@ static void propset_private_tests(void) "IID_IClassFactory) should have returned DSERR_INVALIDPARAM, " "returned: %s\n",DXGetErrorString8(rc)); + rc = (fProc)(&CLSID_DirectSound, &IID_IDirectSound, (void **)(&pcf)); + ok(rc==E_NOINTERFACE,"DllGetClassObject(CLSID_DirectSound, " + "IID_IDirectSound) should have returned E_NOINTERFACE, " + "returned: %s\n",DXGetErrorString8(rc)); + + rc = (fProc)(&CLSID_DirectSound, &IID_IUnknown, (void **)(&pcf)); + ok(rc==DS_OK,"DllGetClassObject(CLSID_DirectSound, " + "IID_IUnknown) failed: %s\n",DXGetErrorString8(rc)); + rc = (fProc)(&CLSID_DirectSound, &IID_IClassFactory, (void **)(&pcf)); ok(pcf!=0, "DllGetClassObject(CLSID_DirectSound, IID_IClassFactory) " "failed: %s\n",DXGetErrorString8(rc));