2.2.2.6 HEADER
The HEADER structure is located at the beginning of the PST file (absolute file offset 0), and contains metadata about the PST file, as well as the ROOT information to access the NDB Layer data structures. Note that the layout of the HEADER structure, including the location and relative ordering of some fields, differs between the Unicode and ANSI versions.
Unicode:
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dwMagic |
|||||||||||||||||||||||||||||||
dwCRCPartial |
|||||||||||||||||||||||||||||||
wMagicClient |
wVer |
||||||||||||||||||||||||||||||
wVerClient |
bPlatformCreate |
bPlatformAccess |
|||||||||||||||||||||||||||||
dwReserved1 |
|||||||||||||||||||||||||||||||
dwReserved2 |
|||||||||||||||||||||||||||||||
bidUnused |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
bidNextP |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
dwUnique |
|||||||||||||||||||||||||||||||
rgnid[] (128 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
qwUnused |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
root (72 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
dwAlign |
|||||||||||||||||||||||||||||||
rgbFM (128 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
rgbFP (128 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
bSentinel |
bCryptMethod |
rgbReserved |
|||||||||||||||||||||||||||||
bidNextB |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
dwCRCFull |
|||||||||||||||||||||||||||||||
rgbReserved2 |
bReserved |
||||||||||||||||||||||||||||||
rgbReserved3 (32 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
ANSI:
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dwMagic |
|||||||||||||||||||||||||||||||
dwCRCPartial |
|||||||||||||||||||||||||||||||
wMagicClient |
wVer |
||||||||||||||||||||||||||||||
wVerClient |
bPlatformCreate |
bPlatformAccess |
|||||||||||||||||||||||||||||
dwReserved1 |
|||||||||||||||||||||||||||||||
dwReserved2 |
|||||||||||||||||||||||||||||||
bidNextB |
|||||||||||||||||||||||||||||||
bidNextP |
|||||||||||||||||||||||||||||||
dwUnique |
|||||||||||||||||||||||||||||||
rgnid[] (128 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
root (40 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
rgbFM (128 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
rgbFP (128 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
bSentinel |
bCryptMethod |
rgbReserved |
|||||||||||||||||||||||||||||
ullReserved |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
dwReserved |
|||||||||||||||||||||||||||||||
rgbReserved2 |
bReserved |
||||||||||||||||||||||||||||||
rgbReserved3 (32 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
dwMagic (4 bytes): MUST be "{ 0x21, 0x42, 0x44, 0x4E } ("!BDN")".
dwCRCPartial (4 bytes): The 32-bit cyclic redundancy check (CRC) value of the 471 bytes of data starting from wMagicClient (0ffset 0x0008)
wMagicClient (2 bytes): MUST be "{ 0x53, 0x4D }".
wVer (2 bytes): File format version. This value MUST be 14 or 15 if the file is an ANSI PST file, and MUST be greater than 23 if the file is a Unicode PST file. If the value is 37, it indicates that the file is written by an Outlook of version that supports Windows Information Protection (WIP). The data MAY have been protected by WIP.
wVerClient (2 bytes): Client file format version. The version that corresponds to the format described in this document is 19. Creators of a new PST file based on this document SHOULD initialize this value to 19.
bPlatformCreate (1 byte): This value MUST be set to 0x01.
bPlatformAccess (1 byte): This value MUST be set to 0x01.
dwReserved1 (4 bytes): Implementations SHOULD ignore this value and SHOULD NOT modify it. Creators of a new PST file MUST initialize this value to zero.<9>
dwReserved2 (4 bytes): Implementations SHOULD ignore this value and SHOULD NOT modify it. Creators of a new PST file MUST initialize this value to zero.<10>
bidUnused (8 bytes Unicode only): Unused padding added when the Unicode PST file format was created.
bidNextB (4 bytes ANSI only): Next BID. This value is the monotonic counter that indicates the BID to be assigned for the next allocated block. BID values advance in increments of 4. For more details, see section 2.2.2.2.
bidNextP (Unicode: 8 bytes; ANSI: 4 bytes): Next page BID. Pages have a special counter for allocating bidIndex values. The value of bidIndex for BIDs for pages is allocated from this counter.
dwUnique (4 bytes): This is a monotonically-increasing value that is modified every time the PST file's HEADER structure is modified. The function of this value is to provide a unique value, and to ensure that the HEADER CRCs are different after each header modification.
rgnid[] (128 bytes): A fixed array of 32 NIDs, each corresponding to one of the 32 possible NID_TYPEs (section 2.2.2.1). Different NID_TYPEs can have different starting nidIndex values. When a blank PST file is created, these values are initialized by NID_TYPE according to the following table. Each of these NIDs indicates the last nidIndex value that had been allocated for the corresponding NID_TYPE. When an NID of a particular type is assigned, the corresponding slot in rgnid is also incremented by 1.
-
NID_TYPE
Starting nidIndex
NID_TYPE_NORMAL_FOLDER
1024 (0x400)
NID_TYPE_SEARCH_FOLDER
16384 (0x4000)
NID_TYPE_NORMAL_MESSAGE
65536 (0x10000)
NID_TYPE_ASSOC_MESSAGE
32768 (0x8000)
Any other NID_TYPE
1024 (0x400)
qwUnused (8 bytes): Unused space; MUST be set to zero. Unicode PST file format only.
root (Unicode: 72 bytes; ANSI: 40 bytes): A ROOT structure (section 2.2.2.5).
dwAlign (4 bytes): Unused alignment bytes; MUST be set to zero. Unicode PST file format only.
rgbFM (128 bytes): Deprecated FMap. This is no longer used and MUST be filled with 0xFF. Readers SHOULD ignore the value of these bytes.
rgbFP (128 bytes): Deprecated FPMap. This is no longer used and MUST be filled with 0xFF. Readers SHOULD ignore the value of these bytes.
bSentinel (1 byte): MUST be set to 0x80.
bCryptMethod (1 byte): Indicates how the data within the PST file is encoded. MUST be set to one of the pre-defined values described in the following table.
-
Value
Friendly name
Meaning
0x00
NDB_CRYPT_NONE
Data blocks are not encoded.
0x01
NDB_CRYPT_PERMUTE
Encoded with the Permutation algorithm (section 5.1).
0x02
NDB_CRYPT_CYCLIC
Encoded with the Cyclic algorithm (section 5.2).
0x10
NDB_CRYPT_EDPCRYPTED
Encrypted with Windows Information Protection.
rgbReserved (2 bytes): Reserved; MUST be set to zero.
bidNextB (Unicode ONLY: 8 bytes): Next BID. This value is the monotonic counter that indicates the BID to be assigned for the next allocated block. BID values advance in increments of 4. For more details, see section 2.2.2.2.
dwCRCFull (4 bytes): The 32-bit CRC value of the 516 bytes of data starting from wMagicClient to bidNextB, inclusive. Unicode PST file format only.
ullReserved (8 bytes): Reserved; MUST be set to zero. ANSI PST file format only.
dwReserved (4 bytes): Reserved; MUST be set to zero. ANSI PST file format only.
rgbReserved2 (3 bytes): Implementations SHOULD ignore this value and SHOULD NOT modify it. Creators of a new PST MUST initialize this value to zero.<11>
bReserved (1 byte): Implementations SHOULD ignore this value and SHOULD NOT modify it. Creators of a new PST file MUST initialize this value to zero.<12>
rgbReserved3 (32 bytes): Implementations SHOULD ignore this value and SHOULD NOT modify it. Creators of a new PST MUST initialize this value to zero.<13>