dsound/tests: Fix the capture COM tests for older Win2k versions.

This commit is contained in:
Michael Stefaniuc 2012-02-13 21:37:38 +01:00 committed by Alexandre Julliard
parent 011a3523aa
commit 0872572a6d

View file

@ -695,9 +695,15 @@ static void test_COM(void)
bufdesc.lpwfxFormat = &wfx; bufdesc.lpwfxFormat = &wfx;
hr = IDirectSoundCapture_CreateCaptureBuffer(dsc, &bufdesc, &buffer, (IUnknown*)0xdeadbeef); hr = IDirectSoundCapture_CreateCaptureBuffer(dsc, &bufdesc, &buffer, (IUnknown*)0xdeadbeef);
if (hr == E_INVALIDARG) {
/* Old DirectX has only the 1st version of the DSCBUFFERDESC struct */
bufdesc.dwSize = sizeof(DSCBUFFERDESC1);
hr = IDirectSoundCapture_CreateCaptureBuffer(dsc, &bufdesc, &buffer, (IUnknown*)0xdeadbeef);
}
ok(hr == DSERR_NOAGGREGATION, ok(hr == DSERR_NOAGGREGATION,
"IDirectSoundCapture_CreateCaptureBuffer failed: %08x, expected DSERR_NOAGGREGATION\n", hr); "IDirectSoundCapture_CreateCaptureBuffer failed: %08x, expected DSERR_NOAGGREGATION\n", hr);
ok(buffer == (IDirectSoundCaptureBuffer*)0xdeadbeef, "buffer = %p\n", buffer); ok(buffer == (IDirectSoundCaptureBuffer*)0xdeadbeef || !buffer /* Win2k without DirectX9 */,
"buffer = %p\n", buffer);
hr = IDirectSoundCapture_CreateCaptureBuffer(dsc, &bufdesc, &buffer, NULL); hr = IDirectSoundCapture_CreateCaptureBuffer(dsc, &bufdesc, &buffer, NULL);
ok(hr == DS_OK, "IDirectSoundCapture_CreateCaptureBuffer failed: %08x, expected DS_OK\n", hr); ok(hr == DS_OK, "IDirectSoundCapture_CreateCaptureBuffer failed: %08x, expected DS_OK\n", hr);