Click to See Complete Forum and Search --> : IStream from File


A. Dunkel
May 5th, 1999, 05:50 AM
I need a IStream-Interface for to file to write. It dosn't a compound file!!! how can I do. A Filemoniker giv'nt the IStream-Interface.
Thanks

Michael Decker
May 5th, 1999, 11:49 AM
If you want an example of how the get an 'IStream *' to a text file, then give me your email address and I'll send you one.

David L Hill
May 6th, 1999, 04:23 PM
I would also be interested in any sample code.

From what I could find, it seemed that IStream would apply to a stream within a compound file or a memory buffer. So I could use a memory buffer and handle read/write myself. Is there another way to do this?

Thanks.

A. Dunkel
May 7th, 1999, 09:44 AM
I have create a stream in memory; overgive this to the interface and write the returned memory to a file.
I think, the better way ist to create a class, that implements IStream and change the Read/write-methods.
If interest, you can get it; mail me.
Andreas

Michael Decker
May 10th, 1999, 07:50 AM
Yes, you get an IStream pointer from an IStorage pointer.

You can open any file using the StgCreateDocfile() function and as long as you just want to read the data, then you're okay. If however you save, then the file structure is changed to a compound file. Depending on what you're trying to do, this may or may not be acceptable.