blog

枪手亨利

博客园 首页 新随笔 联系 订阅 管理
Structured Storage - The DocFile
http://www.codeproject.com/file/structstor.asp

Introduction

Structured storage is something which, when done using the plain Windows API, seems overly complicated; much more so than is needed. The aim of this article is to briefly introduce you to the concepts behind structured storage, and then provide a helper class to simplify its usage.

The idea behind structured storage is that a single file can itself contain a basic filing system. Its main reason for existence was to help with OLE documents: embedded objects are simply save as separate 'streams' within the single file. Here is a diagram which illustrates this concept:

STRUCTURED STORAGE FILE
  • First_stream
  • Second_stream
  • A_storage
    • Stream_in_stg

Although this technology is primarily for use in OLE, it can be put to other uses. In order to help you access the functionality of this powerful tool easily, I have created a helper class, namely CSSFile, to aid in the creation, and modification of structured storage files.

Updates

posted on 2005-12-13 16:30  henry  阅读(598)  评论(0)    收藏  举报