Reputation: 2469
My application will be writing files to the disk from a MemoryStream. Instead of creating my own progress dialogs, I would love to use existing windows functionality e.g. SHFileOperation Win32 API that shows the standard file copy dialog box with animation and progress bar. However, this particular API requires that a path to the source file be specified. Is it possible to somehow use a MemoryStream with this API or is there another API that I can use?
Upvotes: 2
Views: 1731
Reputation: 13611
You can use Shell Progress Dialogs for this; this API exposes the dialog only, allowing you to use it to show the progress of any type of operation in your own application.
I wrote a managed wrapper for this a while ago, which you may find useful: Using Shell Progress Dialogs in Windows Forms Applications
Upvotes: 2