dsound: Add class factory tests.
This commit is contained in:
parent
595d6aa6fb
commit
425608a120
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue