Commit a303f9cd authored by Roger Zoellner's avatar Roger Zoellner Committed by Alexandre Julliard

xaudio2: Don't return XAudio28 interface for XAudio2[0..7] objects in QueryInterface().

parent b02cdd36
......@@ -1273,6 +1273,9 @@ START_TEST(xaudio2)
if(hr == S_OK){
xaudio27 = TRUE;
hr = IXAudio27_QueryInterface(xa27, &IID_IXAudio28, (void**) &xa);
ok(hr != S_OK, "QueryInterface with IID_IXAudio28 on IXAudio27 object returned success. Expected to fail\n");
hr = IXAudio27_Initialize(xa27, 0, XAUDIO2_ANY_PROCESSOR);
ok(hr == S_OK, "Initialize failed: %08x\n", hr);
......
......@@ -1262,7 +1262,9 @@ static HRESULT WINAPI IXAudio2Impl_QueryInterface(IXAudio2 *iface, REFIID riid,
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject);
if(IsEqualGUID(riid, &IID_IUnknown) ||
#if XAUDIO2_VER == 8
IsEqualGUID(riid, &IID_IXAudio28) ||
#endif
IsEqualGUID(riid, &IID_IXAudio2))
*ppvObject = &This->IXAudio2_iface;
else if(IsEqualGUID(riid, &IID_IXAudio27)){
......
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