Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 5 removal of WinRT support does not correctly reject ComInterfaceType.InterfaceIsIInspectable #41621

Closed
Scottj1s opened this issue Aug 31, 2020 · 1 comment · Fixed by #41633
Assignees
Milestone

Comments

@Scottj1s
Copy link

Found when adding ComImport-based unit tests to C#/WinRT. An interface defined with ComInterfaceType.InterfaceIsIInspectable will cast without error, but subsequent interface calls will AV. According to @jkoritzinsky, the correct behavior is to throw an exception on the cast.

Repro:
unit test code
cast code, Marshal.GetObjectForIUnknown

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Aug 31, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@AaronRobinsonMSFT AaronRobinsonMSFT removed the untriaged New issue has not been triaged by the area owner label Aug 31, 2020
@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 5.0.0 milestone Aug 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants