CsWinRT
CsWinRT copied to clipboard
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
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.
As for the invalid name, does the activation factory call return ERROR_MOD_NOT_FOUND
?