Thursday, September 09, 2010

Structured storage viewer

Before the advent of .NET, Windows development involved a lot of fiddling around with COM interfaces and trying to figure out HRESULT error codes. One prime example of this is the interfaces used to access structure storage. Structured storage is a strange beast itself, providing a way to stitch together composite files, sort of like a seriously complicated version of ZIP files. Of course this was a solution in search of a problem, it turns out ZIP files are pretty much adequate for most situations, which is probably why Office now uses them.

But these technologies have a habit of sticking around (I guess Windows will continue supporting structured storage for the rest of time or until Windows no longer exists, whichever comes sooner). So I was faced with writing some code that had to interact with structured storage. .NET wisely doesn’t have any support for it, so I was faced with dealing with the really horrible COM interfaces. And I was even thinking I’d have to write a little application to let me see inside these composite files, so I’d have a clue what was going on. But fortunately I discovered somebody had already done the job for me, and I finally get to the point of this post. If you need a structured storage viewer, download it from here. http://www.mitec.cz/ssv.html

2 comments:

Anonymous said...

Structured storage was an answer to a problem that has gone away. When 640K bytes was the max on a PC (and many PCs had less in the early days of Windows) it was necessary to load pieces of a file rather than the whole file. Unix, which had the same problem at the time, just implemented the ability to read a specified number of bytes at a specified offset and programmers figured out on their own how to use this. Microsoft wanted their programs to interoperate and developed these APIs as a standard way to segment a file. Like much of what MS did in those days they were not carefully designed but were hacked together by smart people who believed working code answered all objections.

Doogal said...

Interesting point. I didn't realise that structured storage was that old!