-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
API suggestion: RuntimeFeature.IsComActivationSupported #35539
Comments
Note that there many other parts of COM not implemented by Mono. COM activation is just a small part of it. #35079 is about adding test project property (e.g. I do not see the value of public API(s) for this. Catching the PlatformNotSupported exception should be sufficient for the few situations that need it. |
I have in mind applications that might attempt to instantiate plugins via registered COM interfaces. The idea is that they could perform feature detection to avoid using a COM based plugin model at all if they know all the calls will fail. Your suggestion instead is that these apps should attempt COM instantiation anyway, treating the exception as "feature unavailable" rather than as a configuration error that requires user attention? |
Yes, I think catching |
Suggestion for catching |
Related: #34328
This API answers the question "Does the current environment support
Type.GetTypeFromCLSID
(orCoCreateInstance
in general)?" This API returning true doesn't guarantee that a particular COM instantiation will succeed. The API returning false means that COM activation APIs will throw PNSE so the caller shouldn't bother.The text was updated successfully, but these errors were encountered: