How to set clipboard data with the image that is not local when setting?

kai xiong 21 Reputation points
2025-03-10T15:42:25.72+00:00

Hi, I'm trying to implement a feature, "copy" operation in my web APP will call C# dll API to set the image files data into clipboard, the image files don't exist locally, when user do "paste" operation, the app downloads the image files into local storage and paste to the target application. Now, I can paste Windows File Explorer by using System.Runtime.InteropServices.ComTypes.IDataObject "FileGroupDescriptorW"

"FileContents", but can't paste the bitmap to 3rd APP when the image file is not stored. Anyone can help? Sample code of setting bitmap with DataObject Will be good. Thanks a lot!

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,339 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.