I have an implementation of a custom DataObject (Virtual File) see here. I have drag and drop functionality in a control view (drag and drop a file OUT of a control view without having a temp local file). This works fine with smaller files but as soon as the file is larger than say 12-15megs it says not eough memory available. seems like the memory stream is out of memory. what can i do about this? can i somehow split a larger byte[] into several memoryStreams and reassemble those to a single file? Any help would be highly appreciated.
A:
can i somehow split a larger byte[] into several momoryStreams and reassemble those to a single file?
Yes.
When I had to deal with a similar situation I built my own stream that internally used byte arrays of 4mb. This "paging" means it never has to allocate ONE LARGE BYTE ARRAY, which is what memory stream does. So, dump memory stream, build your own stream based on another internal storage mechanism.
TomTom
2010-10-28 11:57:37