dsound: Correct error return when COM aggregation attempted
Mike O'Regan
moregan at stresscafe.com
Sun Sep 11 23:11:17 CDT 2005
Index: dlls/dsound/dsound.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/dsound.c,v
retrieving revision 1.36
diff -r1.36 dsound.c
1679a1680,1682
> if (pUnkOuter != NULL)
> return DSERR_NOAGGREGATION;
>
1733c1736
< return DSERR_INVALIDPARAM;
---
> return DSERR_NOAGGREGATION;
1760a1764,1766
> if (pUnkOuter != NULL)
> return DSERR_NOAGGREGATION;
>
1814c1820
< return DSERR_INVALIDPARAM;
---
> return DSERR_NOAGGREGATION;
Index: dlls/dsound/tests/dsound.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/dsound.c,v
retrieving revision 1.55
diff -r1.55 dsound.c
177a178,186
> /* try the COM class factory method w/ aggregation, which
isn't allowed */
> dso=NULL;
> rc=CoCreateInstance(&CLSID_DirectSound, (LPUNKNOWN)1,
CLSCTX_INPROC_SERVER,
> &IID_IDirectSound, (void**)&dso);
>
ok(rc==DSERR_NOAGGREGATION,"CoCreateInstance(CLSID_DirectSound)
didn't reject aggregation: %s\n",
> DXGetErrorString8(rc));
> if (dso)
> IDirectSound_test(dso, FALSE, NULL);
>
219a229,236
> /* try with aggregation, which is not allowed*/
> rc=DirectSoundCreate(NULL,&dso,(LPUNKNOWN)1);
> ok(rc==DSERR_NOAGGREGATION,
> "DirectSoundCreate() didn't reject aggregation: %s\n",
> DXGetErrorString8(rc));
> if (rc==DS_OK && dso)
> IDirectSound_test(dso, TRUE, NULL);
>
224c241
< if (rc==S_OK && dso)
---
> if (rc==DS_OK && dso)
325c342
< "buffer %s\n",DXGetErrorString8(rc));
---
> "buffer: %s\n",DXGetErrorString8(rc));
Index: dlls/dsound/tests/dsound8.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/dsound8.c,v
retrieving revision 1.25
diff -r1.25 dsound8.c
196a197,205
> /* try the COM class factory method w/ aggregation, which
isn't allowed */
> dso=NULL;
> rc=CoCreateInstance(&CLSID_DirectSound8, (LPUNKNOWN)1,
CLSCTX_INPROC_SERVER,
> &IID_IDirectSound8, (void**)&dso);
>
ok(rc==DSERR_NOAGGREGATION,"CoCreateInstance(CLSID_DirectSound8)
didn't reject aggregation: %s\n",
> DXGetErrorString8(rc));
> if (dso)
> IDirectSound8_test(dso, FALSE, NULL);
>
200c209,210
< ok(rc==S_OK,"CoCreateInstance() failed: %s\n",DXGetErrorString8(rc));
---
> ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound8) failed: %s\n",
> DXGetErrorString8(rc));
205c215
< * device specified */
---
> * device specified */
237a248,255
> /* try with aggregation, which is not allowed*/
> rc=pDirectSoundCreate8(NULL,&dso,(LPUNKNOWN)1);
> ok(rc==DSERR_NOAGGREGATION,
> "DirectSoundCreate8() didn't reject aggregation: %s\n",
> DXGetErrorString8(rc));
> if (rc==DS_OK && dso)
> IDirectSound8_test(dso, TRUE, NULL);
>
240c258
< ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
---
> ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
247,248c265,267
< ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
< "DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
---
> ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
> "DirectSoundCreate8(DSDEVID_DefaultPlayback) failed: %s\n",
> DXGetErrorString8(rc));
254,255c273,275
< ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
< "DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
---
> ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
> "DirectSoundCreate8(DSDEVID_DefaultVoicePlayback) failed: %s\n",
> DXGetErrorString8(rc));
488c508,509
< trace("Playing a 5 seconds reference tone at the
current volume.\n");
---
> trace("Playing a 5 seconds reference tone at the current "
> "volume.\n");
More information about the wine-patches
mailing list