Commit 0872572a authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent 011a3523
......@@ -695,9 +695,15 @@ static void test_COM(void)
bufdesc.lpwfxFormat = &wfx;
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,
"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);
ok(hr == DS_OK, "IDirectSoundCapture_CreateCaptureBuffer failed: %08x, expected DS_OK\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment