From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/windowscodecs/bitmap.c | 6 +++++- dlls/windowscodecs/tests/bitmap.c | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/bitmap.c b/dlls/windowscodecs/bitmap.c index 53d3361d346..6dd340db93b 100644 --- a/dlls/windowscodecs/bitmap.c +++ b/dlls/windowscodecs/bitmap.c @@ -30,6 +30,9 @@ #include "wine/asm.h" #include "wine/debug.h"
+#include "initguid.h" +DEFINE_GUID(IID_IMILUnknown, 0x0ccd7824,0xdc16,0x4d09,0xbc,0xa8,0x6b,0x09,0xc4,0xef,0x55,0x35); + WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
/* WARNING: .NET Media Integration Layer (MIL) directly dereferences @@ -253,7 +256,8 @@ static HRESULT WINAPI BitmapImpl_QueryInterface(IWICBitmap *iface, REFIID iid, } else { - FIXME("unknown interface %s\n", debugstr_guid(iid)); + if (!IsEqualIID(&IID_IMILUnknown, iid)) + FIXME("unknown interface %s\n", debugstr_guid(iid)); *ppv = NULL; return E_NOINTERFACE; } diff --git a/dlls/windowscodecs/tests/bitmap.c b/dlls/windowscodecs/tests/bitmap.c index 3ddd3bbdbae..e53167a0857 100644 --- a/dlls/windowscodecs/tests/bitmap.c +++ b/dlls/windowscodecs/tests/bitmap.c @@ -30,6 +30,9 @@ #include "wincodec.h" #include "wine/test.h"
+#include "initguid.h" +DEFINE_GUID(IID_IMILUnknown, 0x0ccd7824,0xdc16,0x4d09,0xbc,0xa8,0x6b,0x09,0xc4,0xef,0x55,0x35); + extern IID IID_IMILBitmap; extern IID IID_IMILBitmapSource; extern IID IID_IMILBitmapLock; @@ -1464,6 +1467,12 @@ static void test_IMILBitmap(void) IWICBitmapScaler_Release(scaler); mil_source->lpVtbl->Release(mil_source); mil_bitmap->lpVtbl->Release(mil_bitmap); + + mil_unknown = (void *)0xdeadbeef; + hr = IWICBitmap_QueryInterface(bitmap, &IID_IMILUnknown, (void **)&mil_unknown); + ok(hr == E_NOINTERFACE, "got %#lx\n", hr); + ok(!mil_unknown, "got %p\n", mil_unknown); + IWICBitmap_Release(bitmap); }
This interface iid is called IID_CMetaBitmapRenderTarget. In some modules we're using WARN for all rejected iids in some modules, but that's for @madewokherd to decide.
This interface iid is called IID_CMetaBitmapRenderTarget.
How do you know that? I couldn't find this IID in Windows 10.0.19041.0 PSDK.
On Fri Mar 29 16:27:18 2024 +0000, Dmitry Timoshkov wrote:
This interface iid is called IID_CMetaBitmapRenderTarget.
How do you know that? I couldn't find this IID in Windows 10.0.19041.0 PSDK.
You can find it in published wpf sources, at https://github.com/dotnet/wpf.
How do you know that? I couldn't find this IID in Windows 10.0.19041.0 PSDK.
Found it in https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/WpfGfx/...