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

Fix handling of COM interfaces with same method name #3059

Merged

Conversation

sivadeilra
Copy link
Collaborator

It is common in COM interfaces for different interfaces to have methods that have the same name, especially for interface "versions" that extend the semantics of the underlying interfaces. For example, look at many of the inheritance relationships in COM interfaces in DirectWrite (IDWriteTextFormat, IDWriteTextFormat2, IDWriteTextFormat3, etc.)

This fixes the handling of this situation. All that is necessary is to use the syntax which explicitly selects a specific trait, when invoking IFoo_Impl methods. This PR adds unit test coverage for this situation.

It is common in COM interfaces for different interfaces to have methods
that have the same name, especially for interface "versions" that
extend the semantics of the underlying interfaces.  For example,
look at many of the inheritance relationships in COM interfaces in
DirectWrite (IDWriteTextFormat, IDWriteTextFormat2, IDWriteTextFormat3,
etc.)

This fixes the handling of this situation. All that is necessary is to
use the syntax which explicitly selects a specific trait, when invoking
IFoo_Impl methods. This PR adds unit test coverage for this situation.
@sivadeilra sivadeilra merged commit 71f8c2a into microsoft:master May 26, 2024
90 checks passed
@sivadeilra sivadeilra deleted the user/ardavis/fix-dup-method-names branch May 26, 2024 03:27
mati865 pushed a commit to mati865/windows-rs that referenced this pull request Jun 15, 2024
It is common in COM interfaces for different interfaces to have methods
that have the same name, especially for interface "versions" that
extend the semantics of the underlying interfaces.  For example,
look at many of the inheritance relationships in COM interfaces in
DirectWrite (IDWriteTextFormat, IDWriteTextFormat2, IDWriteTextFormat3,
etc.)

This fixes the handling of this situation. All that is necessary is to
use the syntax which explicitly selects a specific trait, when invoking
IFoo_Impl methods. This PR adds unit test coverage for this situation.

Co-authored-by: Arlie Davis <ardavis@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants