Dear Dr. GUI,
I am a graduate student in computing science from Holland.
I am writing a small application that runs under Windows 95. The key to making this app a success is the ability to read the SummaryInformation stream and the DocumentSummaryInformation stream from a structured storage file (such as Word, PowerPoint, and Visio files). It's not just about reading the "raw" stream but making sense of it as well.
The questions:
1) Are there (and what are they) Windows API calls that will do the job for me? I would expect to get the info about all the standard properties of a summary info in some easy way, without having to worry about addresses and offsets within the stream. Is there an easy way to do this?
2) Is the SummaryInformation stream subject to change in the future? Or will its internal structure remain as it exists?
3) If there are no Windows API calls, where can I find detailed information on the internal structure of the SummaryInformation stream and the DocumentSummaryInformation stream?
So it's either the API calls that unburden the programmer of the "raw" task of figuring the stream out himself, or a detailed description of the stream's internal structure. Have I overlooked another possibility?
Regards,
Ralph (co-author of the SEA graphics viewer)
Dr. GUI replies:
Dr. GUI remembers Cliff's Notes from his undergrad years (not that he ever used them, of course!) and how important summary information was. The good doctor is glad indeed, then, to tell you that yes, there are APIs to help you read DocumentSummaryInformation and SummaryInformation streams. If created properly by the document's application, these are structured storage property sets and reading and writing properties to them is as simple as calling IPropertyStorage::ReadMultiple() and IPropertyStorage::WriteMultiple(). For information on the properties contained in both of these streams, please refer to the Platform SDK documentation on the MSDN Library CD (or online at http://www.microsoft.com/msdn/). Specifically, do a query on "The Summary Information Property Set" for the SummaryInformation stream and "The DocumentSummaryInformation Property Set." IPropertyStorage and IPropertySetStorage are described in the Interface reference in the Platform SDK online docs.
As far as whether these stream formats will change in the future, remember that Dr. GUI is a programmer, not a fortune-teller. But at least the format won't change as it conforms to the IPropertySetStorage specification. And since the interfaces you use to read and write them are COM interfaces, they won't change, either. The IDs for existing properties in these sets are not likely to change since adding new properties will have no effect on existing ones. The types for existing properties may change, but that is unlikely also.