By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,877 Members | 1,064 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,877 IT Pros & Developers. It's quick & easy.

OLE Structured Storage files

P: n/a
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
da**********@thermo.com
512-251-1400
Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"David Groves" <da**********@thermo.com> wrote in message
news:ep**************@TK2MSFTNGP11.phx.gbl...
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
da**********@thermo.com
512-251-1400


Nov 15 '05 #2

P: n/a
> "Just how hard could it be?" he asks, knowing that 'hard' is a relative
concept.


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
Nov 15 '05 #3

P: n/a
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" <da**********@thermo.com> wrote in message
news:ep**************@TK2MSFTNGP11.phx.gbl...
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
da**********@thermo.com
512-251-1400

Nov 15 '05 #4

P: n/a
> 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.

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
Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.