Skip to content

Add explicit comments in shared clipboard/OLE code warning that it is used by both WinForms and WPF #14305

@KlausLoeffelmann

Description

@KlausLoeffelmann

There is currently no explicit comment or warning in the shared clipboard/OLE implementation code (e.g., in System.Private.Windows.Core/src/System/Private/Windows/Ole/Composition.NativeToManagedAdapter.cs) indicating that it is also used by WPF via the WindowsDesktop shared framework transport/package.

Please add clear comments/headings in key shared files, especially those affecting OLE clipboard or IDataObject interop, stating that changes can impact both Windows Forms and WPF. This will help prevent accidental changes with unintended cross-framework effects.

Context: Recent bugfixes (e.g., for #14308) required backporting patches for a codepath only indirectly surfaced in WinForms repo but used by both frameworks. See also: #14257, #14296.

Suggested action:

  • Add a visible multi-line comment (or file header, if appropriate) to affected shared files.
  • Briefly state that these files/components are shipped as part of the WindowsDesktop shared framework and used by both WinForms and WPF.
  • Optionally point to relevant documentation (see related issue for shared clipboard/OLE architecture doc).

(Created by Copilot)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-ClipboardIssues related to Clipboardarea-InteropenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions