How to share office word clipboard between windows 10 hosts by delayed rendering mechanism of the clipboard?

  • Thread starter Thread starter Acewind
  • Start date Start date
A

Acewind

Guest
I am trying to imitate the implementation of rdpclip.exe to share clipboard data on one host with another host by the delayed rendering mechanism of the clipboard.

My Solution: When the copy behavior occurs in host 1, a C# daemon process which calls AddClipboardFormatListener can capture and send the clipboard format list to a same daemon process on host 2, which will call SetClipboardData on host2 and set data to null. When the pasting behavior occurs on host 2, the data format information contained in the WM_RENDERFORMAT message is sent to the daemon on host 1, which is responsible for calling the GetClipboardData interface to obtain the business data, and reply to host 2, then the paste behavior on host 2 can be successfully completed.

Everything works well until I use Word 2016. When I select all the content in the word window, including text and pictures, copy it, and paste it on another host, the text and text format can be pasted very well, but the pictures can not be displayed. I found that Word on host 1 stores some HTML format information in the clipboard. The pictures are actually placed under the temporary path list msohtmlclip and reflected in the clipboard in the form of links, so they cannot be transtered and pasted.

But microsoft rdpclip.exe can do it. It does not simply paste the HTML format data. It seems to integrate all the content into the RTF format data segment and transter to another host. I don't know how to realize that, anyone know how to handle clipboard data sharing like Office Word? Thanks!

Continue reading...
 
Back
Top