OLE Structured Storage files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Groves

    OLE Structured Storage files

    Are there any plans to incorporate a native C# facility to deal with the OLE
    Structured Storage concept? It's clumsy at best to have to construct a C++
    interface to the .doc files (or any such files by any suffix), when
    Microsoft uses the concept in most, if not all, of their other products.
    "Just how hard could it be?" he asks, knowing that 'hard' is a relative
    concept.

    --
    David Groves
    Thermo Finnigan--AID
    david.groves@th ermo.com
    512-251-1400


  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: OLE Structured Storage files

    Hi David,

    I would also like to see such a facility in the next version of the
    framework, even if I realize Microsoft probably plans to move away from the
    OLE technology in the future and replace it with XML/binary serialization.

    So far, have you tried searching the Web for a ready-made wrapper? I believe
    there should be something like that, and it might be even free - there are
    many interesting open-source .NET projects out there.

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "David Groves" <david.groves@t hermo.com> wrote in message
    news:ep6EI47pDH A.2676@TK2MSFTN GP11.phx.gbl...[color=blue]
    > Are there any plans to incorporate a native C# facility to deal with the[/color]
    OLE[color=blue]
    > Structured Storage concept? It's clumsy at best to have to construct a[/color]
    C++[color=blue]
    > interface to the .doc files (or any such files by any suffix), when
    > Microsoft uses the concept in most, if not all, of their other products.
    > "Just how hard could it be?" he asks, knowing that 'hard' is a relative
    > concept.
    >
    > --
    > David Groves
    > Thermo Finnigan--AID
    > david.groves@th ermo.com
    > 512-251-1400
    >
    >[/color]

    Comment

    • Stefano \WildHeart\ Lanzavecchia

      #3
      Re: OLE Structured Storage files

      > "Just how hard could it be?" he asks, knowing that 'hard' is a relative[color=blue]
      > concept.[/color]

      Not hard at all. On my third day having having installed a beta of Visual
      Studio.NET I had something that pretty much worked. Basic COM interop. I
      only implemented the read bits of the interfaces (no update), since that was
      all I needed but it was only a matter of patience.
      Since then I lost the code and everything, but hope is not lost. A while ago
      I found this: http://www.mvps.org/emorcillo/ Follow the links for
      Source Code>.NET
      and you'll find source code to handle structured storage in the .NET world.
      The source code is in VB.NET but the assembly works in any language, of
      course, and if you really want C# you can always hand-translate it (it
      shouldn't take more than a couple of hours). Good luck!
      --
      WildHeart'2k3


      Comment

      • David Groves

        #4
        Re: OLE Structured Storage files

        Thank you both for your input. I see that I didn't make myself clear: I do
        have a solution, and it is 'basic COM interop'-based, but my quest was for a
        'pure' C# solution. Even if Microsoft is planning a move away from the OLE
        Structured Storage methodology, there's a huge legacy presence of the
        current usage, and it doesn't seem likely that everyone will drop the format
        immediately upon hearing that there's an XML alternative. I am developing a
        solution that uses both the OSS structure and XML, so that we can move at a
        comfortable pace toward XML and away from OSS, but I'm still frustrated that
        I have to depend on the hand-waving that the COM approach seems to require.

        Again, thanks to both of you, Dimitriy and WildHeart, for your very helpful
        replies.
        "David Groves" <david.groves@t hermo.com> wrote in message
        news:ep6EI47pDH A.2676@TK2MSFTN GP11.phx.gbl...[color=blue]
        > Are there any plans to incorporate a native C# facility to deal with the[/color]
        OLE[color=blue]
        > Structured Storage concept? It's clumsy at best to have to construct a[/color]
        C++[color=blue]
        > interface to the .doc files (or any such files by any suffix), when
        > Microsoft uses the concept in most, if not all, of their other products.
        > "Just how hard could it be?" he asks, knowing that 'hard' is a relative
        > concept.
        >
        > --
        > David Groves
        > Thermo Finnigan--AID
        > david.groves@th ermo.com
        > 512-251-1400
        >
        >[/color]


        Comment

        • Stefano \WildHeart\ Lanzavecchia

          #5
          Re: OLE Structured Storage files

          > I am developing a[color=blue]
          > solution that uses both the OSS structure and XML, so that we can move at[/color]
          a[color=blue]
          > comfortable pace toward XML and away from OSS, but I'm still frustrated[/color]
          that[color=blue]
          > I have to depend on the hand-waving that the COM approach seems to[/color]
          require.

          I understand exactly what you mean and share your disappointment. One of the
          good things about structured storage is that, just like in filesystems, you
          can do incremental upgrades to on of the leaves of the document without
          upsetting the rest. Something which you cannot do with plain XML unless you
          use a dedicated XML database (Yukon seems to be heading in that direction
          and there are others). But it's not quite the same thing.
          At some point one guy wrote an open-source replacement for structured
          storage in C#. It's somewhere on Sourceforge though nobody seems to have
          touched it for years. As I said, it was a replacement and not a
          plug-compatible library, so you weren't able to read or write WinWord
          documents using the library but you could only create new documents with a
          philosophy similar to structured storage. I am afraid that's all there is. I
          wonder if there are any commercial implementations out there but given the
          decreased interest in the format I doubt it.

          --
          WildHeart'2k3


          Comment

          Working...