Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 18507, Structured Storage Library

by Tim Knipe Email:

The Plasmatech Structured Storage Library harnesses the power of OLE Structured Storage to store a hierarchy of folders and files inside a single disk file.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 7.0  to 7.0 162 downloads
Copyright: All rights reserved

Size: 141,174 bytes
Updated on Sun, 04 Aug 2002 19:23:41 GMT
Originally uploaded on Mon, 29 Jul 2002 22:11:15 GMT
SHA1 Hash: AA83DC7EC657D5F7AD7103995AF2D9CED66CFAF8
MD5 Hash: 0A0C2C1F9D46B5947EC93F797E4F5EF9

    Explore the files in this upload

//The Problem//
Most applications need to read and write data to disk. Delphi and C++Builder provide powerful database support but sometimes a
database is inappropriate due to slow performance, large resource requirements or inappropriate structure. A database would be
obviously inappropriate for a word processor for example.

The serial nature of disk files means that the programmer is often left writing tedious code to convert their
structured memory objects into serial bytes for a file. This is complicated further if you need to store variable
length structures. A change in the size of a structure at the start of the file means you need to rewrite the
entire file. You might leave empty space in the file to accommodate future growth, but then you have to manage the
slack space.

//The Solution//
The Plasmatech Structured Storage Library alleviates this problem by presenting the programmer with a file system
within a file. Just as you have directories and files in a conventional file system,
Structured Storage provides the programmer with directories (known as storages) and files (known as streams) within a file.

An element inside the file can be added, deleted, moved or copied without affecting any other elements. Incremental
saves are now easy to perform, allowing you to save only changed information rather than having to rewrite the whole
file. All allocation within the structured file is managed for you by OLE, significantly reducing your workload.
Microsoft itself uses Structured Storage to implement for example Word and Excel document files. The example code included
with the Plasmatech library allows you to browse the contents of DOC and XLS files (or any structured file) to see how
they do it!

Your users will appreciate your documents being in one file making it easy for them to copy and backup, and making it
easy for you to integrate into Windows Explorer.

//Also Featuring//
A powerful feature of structured storage supported by the Plasmatech library is "transacted" processing. If you open a
part of the file in transacted mode, you can make as many changes to it as you wish and at any time you can decide to
"commit" those changes and make them permanent, or "revert" them - ie. cancel them - regardless of how many changes
you have made.

The Structured Storage Library is more than a simple wrapper around OLE structured storage. It adds significant new functionality:

Multiple openers are allowed for storages.
Parent storages are automatically kept open for the lifetime of the child.
Pathnames are supported for sub-storages and streams. You can open a stream "stg1\stg2\mystream" without having to open stg1 and stg2 manually.
Optional object leak detection can save many hours of debugging. When your application terminates you are notified if any Structured Storage Library objects remain unfreed.

For more information, see

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03