Always pass back a managed IDataObject if we can get the original #13051
Labels
area-Clipboard
Issues related to Clipboard
area-Serialization-BinaryFormatter-FeatureWork
Feature work under the general area of BinaryFormatter related serialization
Milestone
The unfortunate caveat of returning the original object is that the behavior of calling through the OLE
IDataObject
proxy results in different behavior than calling through the original object. This primarily happens forautoConvert
scenarios, where no such concept exists in the COM interfaces. As such, when calling through the COM interface,autoConvert
is always considered to betrue
.To mitigate the COM caveat, we do not give back the original
DataObject
if we created it implicitly viaClipboard.SetData
. This allows the calls to go through the proxy, which gets the expected
autoConvert` behavior.Doing this should avoid BinaryFormatter scenarios when OLE actions are made in process without copy set to true.
The text was updated successfully, but these errors were encountered: