區段

區段是屬性集資料流程的第三個部分,其中包含實際的屬性值。

區段包含:

  • 包含位元組計數本身之區段的位元組計數。
  • 32 位屬性識別碼/位移組的陣列。
  • 屬性類型指標/值組的陣列。

位移是從區段開頭到屬性開頭 (類型、值) 組的距離。 這可讓區段複製為位元組陣列,而不需要任何內部結構的轉譯。

下列虛擬結構說明區段的格式。

typedef struct tagPROPERTYSECTIONHEADER 
{ 
    DWORD  cbSection ;    // Size of Section 
    DWORD  cProperties ;  // Count of Properties in section 
} PROPERTYSECTIONHEADER; 
 
typedef struct tagPROPERTYIDOFFSET 
{ 
    DWORD  propid;    // Name of property 
    DWORD  dwOffset;  // Offset from start of section to property 
} PROPERTYIDOFFSET; 
 
typedef struct tagSERIALIZEDPROPERTYVALUE 
{ 
    DWORD  dwType;    // Property Type 
    BYTE   rgb[];     // Property Value 
} SERIALIZEDPROPERTYVALUE ;