Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Block usage of default interfaces feature in COM scenarios #23970

Merged
merged 6 commits into from
Apr 19, 2019

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT commented Apr 13, 2019

Block usage of default interfaces within a COM scenario. This accomplished by validating any interface that is being passed into the COM world only contains abstract methods.

Tests:

  • Validate activation as an IUnknown
  • Validate manual activation via IClassFactory
  • Validate activation failing as an interface containing non-abstract methods
  • Validate activation from an interface with all abstract methods but class does implement an interface that contains non-abstract methods
  • Validate QueryInterface() fails when requesting an interface with non-abstract methods

Fixes #15683

cc @MichalStrehovsky @davidwrighton @jkoritzinsky @jeffschwMSFT

Copy link
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to the type system look good. Changes to interop look fine to my somewhat unpracticed eye.

@AaronRobinsonMSFT
Copy link
Member Author

@davidwrighton et al Also note that I ran all COM tests through GCStress and verified no issues and manually confirmed no memory leaks during COM object activation.

@AaronRobinsonMSFT
Copy link
Member Author

@dotnet-bot test Ubuntu arm Cross Checked crossgen_comparison Build and Test please
@dotnet-bot test Ubuntu arm Cross Release crossgen_comparison Build and Test please

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit df6b6f6 into dotnet:master Apr 19, 2019
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the coreclr_15683 branch April 19, 2019 16:26
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…reclr#23970)

* Block default interface usage in COM scenarios

Add additional test cases and move some CCW functions to a more
consolidated layout.


Commit migrated from dotnet/coreclr@df6b6f6
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Default interfaces] Interaction with COM interop
2 participants