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

Runtime support for upcoming .NET Core WinRT Host#23402

Merged
jkoritzinsky merged 13 commits intodotnet:masterfrom
jkoritzinsky:winrt-activation
Apr 4, 2019
Merged

Runtime support for upcoming .NET Core WinRT Host#23402
jkoritzinsky merged 13 commits intodotnet:masterfrom
jkoritzinsky:winrt-activation

Conversation

@jkoritzinsky
Copy link
Copy Markdown
Member

@jkoritzinsky jkoritzinsky commented Mar 22, 2019

Add ActivationFactoryLoader.GetActivationFactory entrypoint for the upcoming .NET Core WinRT host (dotnet/core-setup#5527).

Enable assemblies that a WinRT assembly depends on to be loaded into an AssemblyLoadContext other than the default (required since the WinRT components do not necessarily own the TPA).

Ensure that COM is started correctly before marshalling to or from COM interfaces in the COM interface marshaler.

Comment thread src/vm/assemblyspec.cpp Outdated
Comment thread src/vm/winrttypenameconverter.h Outdated
Comment thread src/vm/winrttypenameconverter.cpp Outdated
@jkoritzinsky
Copy link
Copy Markdown
Member Author

@AaronRobinsonMSFT @vitek-karas can you take a review pass when you get a chance?

Copy link
Copy Markdown
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

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

Looks good to me, but @AaronRobinsonMSFT should also confirm, I'm not an expert in the WinRT related logic.

@jkoritzinsky
Copy link
Copy Markdown
Member Author

Test failures are caused by #23552 and are tracked by #23730.

@jkoritzinsky jkoritzinsky merged commit fdc9998 into dotnet:master Apr 4, 2019
@jkoritzinsky jkoritzinsky deleted the winrt-activation branch April 4, 2019 18:04
jkoritzinsky added a commit to dotnet/core-setup that referenced this pull request Apr 5, 2019
Implement a WinRT host for .NET Core so users can write WinRT WinMDs that target and build on .NET Core.

We can't accurately test this E2E in CI until we have a test machine running a version of Windows with the Reg-Free WinRT support (requires at least Windows 10 19H1 Build 18309).

Runtime side of the host work is in dotnet/coreclr#23402
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* First pass at adding winrt host entry-point.

* There's no way to specify HResult-swapping on a function called via hosted-interop so just return the HResult instead.

* Use the WindowsRuntimeMarshal class to create the activation factory and initialize it.

* Implement loading the dependent assemblies of a WinRT assembly into an isolated load context.

* PR Feedback.

* Fail to get the activation factory if the found type is not a managed type exported from a winmd.

* Rearrange parameters based on PR feedback.

* Remove unneeded include.

* Make ActivationFactoryLoader internal.

* Fix null-ref in WinRT-dependent-assembly loading

* Remove extraneous "System."




Commit migrated from dotnet/coreclr@fdc9998
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.

3 participants