You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered this in a number of places in Desktop code and cannot come up with a reasonable workaround to port the behavior. Given we still support COM interop on Windows and are investing more in that space we should bring this back.
It's not necessarily with good reason eg we have Marshal.GetStartComSlot(Type t) but not Marshal.GetEndComSlot(Type t). In fact most of them look portable - if we still have the native implementation and want to.
Marshal.GetStartComSlot(Type t) but not Marshal.GetEndComSlot(Type t)
Agree. We should either support both or not support both..
IsTypeVisibleFromCom
We should add support. the question is its behavior. in desktop, almost all managed object is Visiable to COM. I am not sure what's right behavior for .NetCore
IsTypeVisibleFromCom is used internally by the COM interop subsystem. This API is just exposing the value publicly.
If we were to change the rules for how COM visibility is computed in .NET Core, it should be looked at as separate issue. (I do not think we have a good reason to change the rules.)
I don't want to add these TypeLib related APIs.
Agree. Let's add only what we know is a real problem or clear inconsistency: IsTypeVisibleFromCom and GetEndComSlot.
@luqunl there is no need to review the API if it was already exposed in .NET Framework. That tag is for proposed new API, to review their shape, value etc. Do you plan to take these or is it up for grabs?
Activity
ericstj commentedon Jun 14, 2018
As a (hack) workaround I did the following, which calls IsTypeVisibleFromCom behind the scenes.
danmoseley commentedon Jul 4, 2018
There's quite a bit of Marshal missing as seen in
https://github.com/dotnet/corefx/blob/master/src/shims/ApiCompatBaseline.netcoreapp.netfx461.ignore.txt#L2595-L2619
It's not necessarily with good reason eg we have
Marshal.GetStartComSlot(Type t)but notMarshal.GetEndComSlot(Type t). In fact most of them look portable - if we still have the native implementation and want to.luqunl commentedon Jul 4, 2018
Agree. We should either support both or not support both..
We should add support. the question is its behavior. in desktop, almost all managed object is Visiable to COM. I am not sure what's right behavior for .NetCore
I don't want to add these TypeLib related APIs.
jkotas commentedon Jul 4, 2018
IsTypeVisibleFromCom is used internally by the COM interop subsystem. This API is just exposing the value publicly.
If we were to change the rules for how COM visibility is computed in .NET Core, it should be looked at as separate issue. (I do not think we have a good reason to change the rules.)
Agree. Let's add only what we know is a real problem or clear inconsistency: IsTypeVisibleFromCom and GetEndComSlot.
danmoseley commentedon Jul 12, 2018
@luqunl there is no need to review the API if it was already exposed in .NET Framework. That tag is for proposed new API, to review their shape, value etc. Do you plan to take these or is it up for grabs?
danmoseley commentedon Aug 13, 2018
@luqunl what is the status of this one, do you plan to do it?
luqunl commentedon Aug 15, 2018
@danmosemsft , working on it.