CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 1998
    Posts
    3

    IStream from File

    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


  2. #2
    Join Date
    Apr 1999
    Posts
    90

    Re: IStream from File

    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.


  3. #3
    Join Date
    May 1999
    Location
    Indiana
    Posts
    21

    Re: IStream from File

    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.


  4. #4
    Join Date
    Apr 1998
    Posts
    3

    Re: IStream from File

    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


  5. #5
    Join Date
    Apr 1999
    Posts
    90

    Re: IStream from File

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured