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

Trying to activate a class that doesn't exist from the POV of WinRT.Host.dll would cause subsequent activation request of class that does exist to throw #1564

Open
roxk opened this issue Apr 8, 2024 · 1 comment
Labels
authoring Related to authoring feature work bug Something isn't working

Comments

@roxk
Copy link

roxk commented Apr 8, 2024

Describe the bug
As titled

To Reproduce
See the minimal repro here: https://github.com/roxk/CsWinRTHostThrow/tree/main

Essentially, you call DllGetActivationFactory with a bogus name like "A.B", and then call again with a known name. The call with the known name would crash.

Removing the prior call to activate "A.B" and just call DllGetActivationFactory with a known name doesn't crash.

C++/WinRT dll's DllGetActivationFactory doesn't have this problem.

Expected behavior
The call to DllGetActivationFactory with a known name doesn't crash, with or without prior call with a bogus name.

Version Info
2.0.7.

Additional context
I'm working on dll support for WinUI3XamlPreview. C++/WinRT dll just works. For CsWinRT dll, this bug is a show-stopper.

@roxk roxk added the bug Something isn't working label Apr 8, 2024
@roxk roxk changed the title Trying to activate a class that doesn't exist from the POV of WinRT.Host.dll would make subsequent activation request of class that does exist throw Trying to activate a class that doesn't exist from the POV of WinRT.Host.dll would cause subsequent activation request of class that does exist to throw Apr 8, 2024
@dongle-the-gadget
Copy link
Contributor

As for the invalid name, does the activation factory call return ERROR_MOD_NOT_FOUND?

@manodasanW manodasanW added the authoring Related to authoring feature work label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authoring Related to authoring feature work bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants