head	1.1;
access;
symbols;
locks
	dps:1.1; strict;
comment	@# @;


1.1
date	97.08.23.21.31.11;	author dps;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@$Id$

This information is might be inaccurate due to it being reverse
engineering using some actual files.

Following an unintentional Microsoft tip-off (in the OLE 2.01 spec,
which documents little more than the API, useless for non-MS systems)
OLE is based on the DOS FAT format. Reverse engineering suggests that

At 0x30 there is a 2 or 4 byte number, which is offset to main table/512.
This strongly suggests that it is a sector number and sectors are 512 bytes
each (as in DOS).

The main table is formated as 4 bytem, little endain numbers that almost
certaintly are sector numbers. -2 indicates the end of a chain.
?-1 is free space
?-3 is FAT

Microsoft documentation: maximum 32 characters per name, including the NULL.
Futher Microsoft document: First character of 1 to 1F means control stream
Currently only 4 are used
1 - basic control streams
2 - OLE presentation
3 - Used by container of this object
4 - used by storage implementation to hold properties

So Entry format is
0 - 63 <=32 character unicode string inluding null, null terminated
64  Looks like some form of format.     
Seems to be 0x16 for IStorage, otherwise I see 0x0a, 0x1a and a
few others. Changing 0x0a to 0x16 produced the Istream entry
repeating forever and made the data the unavialble. Changing an
0x16 to 0x0a made the entry (and its contents, of course) disappear
compeletly but left the other entries unaffected.

65     Unknown, seems to be 0 always (reserved?)
66     ?Format major version (02 in my sample w. few exceptions)
67     ?Format minor version (01 in my sample w. few exceptions)
66 - 79 Unknown
80 - 95 ClassId.
96-120  Unknown
120 - 123 Little endian long data length (0 for IStorage, must be a clue)
124 - 127 0L at the moment, reserved??



ClassId format is

Bytes     4               2    2      8
  Long (little endain)-short-short-8x1 byte
e.g.
Id is: 00020906-0000-0000-c000000000000046
Bytes in file are (word 97 document):
06 09 02 00 00 00 00 00 c0 00 00 00 00 00 00 46

Same word7 document after a little emacs diddling:
Id is: 00020906-0301-0205-c000000000000046
Bytes in file are
06 09 02 00 01 03 05 02 c0 00 00 00 00 00 00 46

The significance of the ID is unclear.

     

@
