3.2.3 User Defined Property Set Overview

The following table contains the beginning of a User Defined property set (section 2.3.3.2.3). In this table, there is an array, rgUserProps. Each element in rgUserProps is a PropertyIdentifierAndOffset structure ([MS-OLEPS] section 2.19). The structure of this section of the User Defined property set (section 2.3.3.2.3) is similar to that described in Document Summary Information Property Set Overview (section 3.2.2). The major difference is that in the User Defined property set (section 2.3.3.2.3) most propId values do not have a meaning defined by this specification, but instead have a meaning defined by their names as found in the Dictionary property (section 3.2.3.1).

Offset

Size

Structure

Value

00000298

0420

B: PropertySet - UserDefinedProperties

00000298

0004

    DWORD - cbSection

0x00000420

0000029C

0004

    DWORD - cProps

0x00000009

000002A0

0048

    Array of PropertyIdentifierAndOffset - rgUserProps

000002A0

0008

        PropertyIdentifierAndOffset - PidOffsetElement-1

000002A0

0004

            DWORD - propId

0x00000000

000002A4

0004

            FilePointer - dictionaryOffset

0x00000050

000002A8

0008

        PropertyIdentifierAndOffset - PidOffsetElement-2

000002A8

0004

            DWORD - propId

0x00000001

000002AC

0004

            FilePointer - codepageOffset

0x000000D2

000002B0

0008

        PropertyIdentifierAndOffset - PidOffsetElement-3

000002B0

0004

            DWORD - propId

0x00000002

000002B4

0004

            FilePointer - linkbaseOffset

0x000000DA

000002B8

0008

        PropertyIdentifierAndOffset - PidOffsetElement-4

000002B8

0004

            DWORD - propId

0x00000003

000002BC

0004

            FilePointer - hyperlinksOffset

0x000000E6

000002C0

0008

        PropertyIdentifierAndOffset - PidOffsetElement-5

000002C0

0004

            DWORD - propId

0x00000004

000002C4

0004

            FilePointer - propOffset

0x000003B6

000002C8

0008

        PropertyIdentifierAndOffset - PidOffsetElement-6

000002C8

0004

            DWORD - propId

0x00000005

000002CC

0004

            FilePointer - propOffset

0x000003CA

000002D0

0008

        PropertyIdentifierAndOffset - PidOffsetElement-7

000002D0

0004

            DWORD - propId

0x00000006

000002D4

0004

            FilePointer - propOffset

0x000003D2

000002D8

0008

        PropertyIdentifierAndOffset - PidOffsetElement-8

000002D8

0004

            DWORD - propId

0x00000007

000002DC

0004

            FilePointer - propOffset

0x000003DA

000002E0

0008

        PropertyIdentifierAndOffset - PidOffsetElement-9

000002E0

0004

            DWORD - propId

0x01000007

000002E4

0004

            FilePointer - propLinkOffset

0x000003FA

000002E8

03D0

    Array of properties - UserDefinedProperties

Figure 24: Overview of a User Defined property set

UserDefinedProperties:  UserDefinedProperties is a PropertySet as detailed in [MS-OLEPS] section 2.20.

cbSection: 0x00000420 indicates the count of bytes from the beginning of the UserDefinedProperties property set (0x00000298) to the end of the last property in the property set, the CriticalSection_Link property (section 3.2.3.4). If the size is calculated as 0x0000069A + 0x001C - 0x00000298, it actually results in a size of 0x0000041E instead of 0x00000420. This is because the property set is padded to a multiple of 4 bytes. After the end of the CriticalSection_Link property (section 3.2.3.4) property, there are 2 bytes of padding to make the count of bytes of the property set a multiple of 4 bytes, resulting in a length of 0x00000420.

cProps: 0x00000009 indicates that this User Defined property set (section 2.3.3.2.3) contains nine properties.

rgUserProps: This is the container of an array of PropertyIdentifierAndOffset structures. In this example, there are nine elements, one for each property.

rgUserProps.PidOffsetElement-1: Dictionary (Dictionary property).

rgUserProps.PidOffsetElement-1.propId: 0x00000000 indicates that there is a Dictionary property value at the stream offset indicated by the dictionaryOffset value.

rgUserProps.PidOffsetElement-1.dictionaryOffset: 0x00000050 indicates that the beginning of the Dictionary property data is 0x00000050 bytes after the beginning of the UserDefinedProperties property set (0x00000298). In this example, the Dictionary property begins at offset 0x000002E8. See the Dictionary property example (section 3.2.3.1).

rgUserProps.PidOffsetElement-2: CodePage (VT_I2 TypedPropertyValue property).

rgUserProps.PidOffsetElement-2.propId: 0x00000001 indicates that there is a CodePage property value at the stream offset indicated by the codepageOffset value.

rgUserProps.PidOffsetElement-2.codepageOffset: 0x000000D2 indicates that the beginning of the CodePage property data is 0x000000D2 bytes after the beginning of the UserDefinedProperties property set.

rgUserProps.PidOffsetElement-3:  User-defined property.

rgUserProps.PidOffsetElement-3.propId: 0x00000002 indicates there is a user-defined property value at the stream offset indicated by the linkbaseOffset value. The name of this user-defined property is specified in the Dictionary property as "_PID_LINKBASE". See the Dictionary Property Example (section 3.2.3.1).

rgUserProps.PidOffsetElement-3.linkbaseOffset: 0x000000DA indicates the user-defined property with propId 0x00000002 begins 0x000000DA bytes after the beginning of the UserDefinedProperties property set. In this example, this property begins at offset 0x00000372. See the LinkBase Property Example (section 3.2.3.2).

rgUserProps.PidOffsetElement-4: User-defined property.

rgUserProps.PidOffsetElement-4.propId: 0x00000003 indicates there is a user-defined property value at the stream offset indicated by the hyperlinksOffset value. The name of this user-defined property is specified in the Dictionary property as "_PID_HLINKS". See the Dictionary Property Example (section 3.2.3.1).

rgUserProps.PidOffsetElement-4.hyperlinksOffset: 0x000000E6 indicates the user-defined property with propId 0x00000003 begins 0x000000E6 bytes after the beginning of the UserDefinedProperties property set. In this example, this property begins at offset 0x0000037E. See the Hyperlinks Property Example (section 3.2.3.3).

rgUserProps.PidOffsetElement-5: User-defined property.

rgUserProps.PidOffsetElement-5.propId: 0x00000004 indicates there is a user-defined property value at the stream offset indicated by the propOffset value. The name of this user-defined property is specified in the Dictionary property as "Department". See the Dictionary Property Example (section 3.2.3.1).

rgUserProps.PidOffsetElement-5.propOffset: 0x000003B6 indicates the user-defined property with propId 0x00000004 begins 0x000003B6 bytes after the beginning of the UserDefinedProperties property set. This property is a Lpstr (section 2.3.3.1.4) property, see Category Property Example (section 3.2.2.2) for an example of a Lpstr (section 2.3.3.1.4) property.

rgUserProps.PidOffsetElement-6: User-defined property.

rgUserProps.PidOffsetElement-6.propId: 0x00000005 indicates there is a user-defined property value at the stream offset indicated by the propOffset value. The name of this user-defined property is specified in the Dictionary property as "Document number". See the Dictionary Property Example (section 3.2.3.1).

rgUserProps.PidOffsetElement-6.propOffset: 0x000003CA indicates the user-defined property with propId 0x00000005 begins 0x000003CA bytes after the beginning of the UserDefinedProperties property set. This property is a VT_I4 TypedPropertyValue property. See the LineCount Property Example (section 3.2.2.3) for an example of a VT_I4 TypedPropertyValue property.

rgUserProps.PidOffsetElement-7: User-defined property.

rgUserProps.PidOffsetElement-7.propId: 0x00000006 indicates there is a user-defined property value at the stream offset indicated by the propOffset value. The name of this user-defined property is specified in the Dictionary property as "Approved". See the Dictionary Property Example (section 3.2.3.1).

rgUserProps.PidOffsetElement-7.propOffset: 0x000003D2 indicates the user-defined property with propId 0x00000006 begins 0x000003D2 bytes after the beginning of the UserDefinedProperties property set. This property is a VT_BOOL TypedPropertyValue property. See the LinksDirty Property Example (section 3.2.2.4) for an example of a VT_BOOL TypedPropertyValue property.

rgUserProps.PidOffsetElement-8: User-defined linked property.

rgUserProps.PidOffsetElement-8.propId: 0x00000007 indicates there is a user-defined property value at the stream offset indicated by the propOffset value. The name of this user-defined property is specified in the Dictionary property as "CriticalSection". See the Dictionary property example (section 3.2.3.1).

rgUserProps.PidOffsetElement-8.propOffset: 0x000003DA indicates the user-defined property with propId 0x00000007 begins 0x000003DA bytes after the beginning of the UserDefinedProperties property set. In this example, this property begins at offset 0x00000672. See the Linked Property Example (section 3.2.3.4).

rgUserProps.PidOffsetElement-9: User-defined Link.

rgUserProps.PidOffsetElement-9.propId: 0x01000007 indicates that the user-defined property in this property set with propId 0x01000007 is linked to document content. This user-defined Link value is at the stream offset indicated by the propLinkOffset value. See the Linked Property Example (section 3.2.3.4).

rgUserProps.PidOffsetElement-9.propLinkOffset: 0x000003FA indicates that the user-defined property link with propId 0x10000007 begins 0x000003FA bytes after the beginning of the UserDefinedProperties property set. In this example, this property begins at offset 0x00000692. See the Linked Property Example (section 3.2.3.4).