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

No way to implement GetRuntimeClassName #1405

Closed
Alovchin91 opened this issue Jan 1, 2022 · 4 comments
Closed

No way to implement GetRuntimeClassName #1405

Alovchin91 opened this issue Jan 1, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Alovchin91
Copy link
Contributor

Motivation

ActivationFactory documentation states that GetRuntimeClassName should return “ the runtime class name of the object that the current ActivationFactory instantiates.”

Currently, this is not possible to do using windows-rs crate.

Drawbacks

None

Rationale and alternatives

This makes authoring WinRT components incomplete and potentially error-prone.

Additional context

No response

@Alovchin91 Alovchin91 added the enhancement New feature or request label Jan 1, 2022
@kennykerr
Copy link
Collaborator

Yes, this is on my radar for the revamped implement macro.

@kennykerr
Copy link
Collaborator

The trait-based implement macro (#1345) will now implement GetRuntimeClassName automatically (here's an example).

Note that this is currently limited to interfaces. Classes (and exclusive interfaces) are on the way (#1094).

@Alovchin91
Copy link
Contributor Author

Thanks! 🙂 I guess it's still impossible to implement it for IActivationFactory, right? Would it be useful to have an ability to override a default implementation?

@kennykerr
Copy link
Collaborator

For most scenarios that shouldn't matter, but yes I plan to support activation factories directly, so you won't have to think about implementing that. I also considered providing an option to override the default implementation using a trait if needed, but I'm not there yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants