Skip to content

Commit

Permalink
Fix ICustomQueryInterface.GetInterface implementation to never delega…
Browse files Browse the repository at this point in the history
…te a QI for IInspectable to the inner. (#155)
  • Loading branch information
jkoritzinsky authored Apr 17, 2020
1 parent 3c5ff48 commit 23332fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions WinUI/WinUIDesktopSample/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
xmlns:local="NetCoreDesktopSample"
mc:Ignorable="d"
Height="450" Width="800">
<Page.Content>
<Grid>
<Grid.Children>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Hello from WinUI Desktop!" />
</Grid.Children>
</Grid>
</Page.Content>

<Grid>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Hello from WinUI Desktop!" x:Name="text"/>
</Grid>
</Page>
2 changes: 1 addition & 1 deletion cswinrt/code_writers.h
Original file line number Diff line number Diff line change
Expand Up @@ -3974,7 +3974,7 @@ default_interface_abi_name);
global::System.Runtime.InteropServices.CustomQueryInterfaceResult global::System.Runtime.InteropServices.ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv)
{
ppv = IntPtr.Zero;
if (IsOverridableInterface(iid))
if (IsOverridableInterface(iid) || typeof(global::WinRT.IInspectable).GUID == iid)
{
return global::System.Runtime.InteropServices.CustomQueryInterfaceResult.NotHandled;
}
Expand Down

0 comments on commit 23332fa

Please sign in to comment.