Problem description:
PR #3388 removed the ComVisible attribute from System.Windows.Forms.IDataObject. That largely breaks the marshaling custom implementation of IDataObject through clipboard within the same application. The concern about marshaling of individual calls is not applicable in that case because the runtime could resolve the IDataObject to the original .NET object implementation.
It likely broke this case in Clipboard.GetDataObject and now all returned objects are wrapped in the default DataObject which doesn't support all the custom types:
|
if (dataObject is IDataObject ido && !Marshal.IsComObject(dataObject)) |
|
{ |
|
return ido; |
|
} |
Expected behavior:
Minimal repro:
TBD
.NET Core Version: 5.0
Have you experienced this same bug with .NET Framework?: No
Problem description:
PR #3388 removed the
ComVisibleattribute fromSystem.Windows.Forms.IDataObject. That largely breaks the marshaling custom implementation ofIDataObjectthrough clipboard within the same application. The concern about marshaling of individual calls is not applicable in that case because the runtime could resolve theIDataObjectto the original .NET object implementation.It likely broke this case in
Clipboard.GetDataObjectand now all returned objects are wrapped in the defaultDataObjectwhich doesn't support all the custom types:winforms/src/System.Windows.Forms/src/System/Windows/Forms/Clipboard.cs
Lines 170 to 173 in 2fd2a58
Expected behavior:
Minimal repro:
TBD