views:

59

answers:

2

Lets begin with the final goal -
I need to able to paste a file into the local file system, that is obtained from a web response stream.

I think that the best course of action is to somehow put something inside the clipboard that will notify me when the pasting action occurs, so I can then run the async request, wait for the response, and send in the stream to the file system. Is it at all possible to do something like that?
If not, maybe I can send the request on the copy operation, obtain the stream (perhaps even copying it fully into a MemoryStream, so I can close the response), and somehow put it inside the clipboard so that pasting will just "spill" it all out?

Anyone here has any suggestions or pointers for me?

+1  A: 

Maybe you can save the file to the Temp folder (Path.GetTempPath()), and then use the regular windows copy/paste mechanism (Clipboard.SetFileDropList)

RA
A: 

I have found this question, with links to a CodeProject article explaining what I should do. Trying to figure it out myself at the moment.

Noam Gal