Are you rewinding the stream in the receiving app to its beginning before you attempt to read it?
Using VirtualFileDataObject
I want to be able to stream data into another app and stream it from another app into my app via the clipboard or by drag and drop. To do this, I am using the VirtualFileDataObject class that I downloaded from here. There is also a demo app on the web page that allows you to stream data to another app using the DataObject contents "FileGroupDescriptorW" and "FileContents".
Unfortunately, copying or drag and drop does not work with every app. If you copy data to Windows Explorer via the clipboard, it works. The data is copied as a file to the destination directory.
However, when I want to receive the data copied with 'VirtualFileDataObject' from the clipboard, the stream is empty. in the debugger I can see that I am reading the stream in my app and I get 0 bytes. At the same time, in the debugger of the sending demo app, I can see that data is being written to the stream there, but it never arrives in my app.
To receive the data I use the code from here.
Does anyone have experience with this and know how to solve the problem?