From 14c71223440aace3e9cc0406b629ba61a1dff351 Mon Sep 17 00:00:00 2001 From: Shmueli Englard Date: Tue, 27 Aug 2024 13:22:02 -0700 Subject: [PATCH] Cast to RIID, not to factory CLSID --- src/Shmuelie.WinRTServer/Internal/BaseClassFactoryWrapper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Shmuelie.WinRTServer/Internal/BaseClassFactoryWrapper.cs b/src/Shmuelie.WinRTServer/Internal/BaseClassFactoryWrapper.cs index 674a972..4867b1e 100644 --- a/src/Shmuelie.WinRTServer/Internal/BaseClassFactoryWrapper.cs +++ b/src/Shmuelie.WinRTServer/Internal/BaseClassFactoryWrapper.cs @@ -38,7 +38,7 @@ internal partial class BaseClassFactoryWrapper(BaseClassFactory factory) : IClas } else { - var hr = (global::Windows.Win32.Foundation.HRESULT)StrategyBasedComWrappers.DefaultIUnknownStrategy.QueryInterface((void*)unknown, factory.Clsid, out *ppvObject); + var hr = (global::Windows.Win32.Foundation.HRESULT)StrategyBasedComWrappers.DefaultIUnknownStrategy.QueryInterface((void*)unknown, *riid, out *ppvObject); if (hr.Failed) { return hr;