Skip to content

Commit

Permalink
Simplify QI
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuelie committed Sep 3, 2024
1 parent fa3f6cc commit f1b917e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public unsafe HRESULT ActivateInstance(void** instance)
{
object managedInstance = factory.ActivateInstance();
unknown = comWrappers.GetOrCreateComInterfaceForObject(managedInstance, CreateComInterfaceFlags.None);
var riid = global::Windows.Win32.System.WinRT.IActivationFactory.IID_Guid;
var hr = (HRESULT)Marshal.QueryInterface(unknown, ref riid, out nint ppv);
var hr = (HRESULT)Marshal.QueryInterface(unknown, in global::Windows.Win32.System.WinRT.IActivationFactory.IID_Guid, out nint ppv);
shouldReleaseUnknown = true;
if (hr.Failed)
{
Expand Down

0 comments on commit f1b917e

Please sign in to comment.