2.3.6.25 META_ESCAPE_ENHANCED_METAFILE Record

The META_ESCAPE_ENHANCED_METAFILE Record is used to embed an EMF metafile within a WMF metafile. The EMF metafile is broken up into sections, each represented by one META_ESCAPE_ENHANCED_METAFILE.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

RecordSize

RecordFunction

EscapeFunction

ByteCount

CommentIdentifier

...

CommentType

...

Version

...

Checksum

Flags

CommentRecordCount

CurrentRecordSize

RemainingBytes

EnhancedMetafileDataSize

EnhancedMetafileData (variable)

...

RecordSize (4 bytes): A 32-bit unsigned integer that defines the number of WORD structures, defined in [MS-DTYP] section 2.2.61, in the record.

RecordFunction (2 bytes): A 16-bit unsigned integer that defines this record type. The lower byte MUST match the lower byte of the RecordType Enumeration (section 2.1.1.1) table value META_ESCAPE.

EscapeFunction (2 bytes): A 16-bit unsigned integer that defines the escape function. The value MUST be 0x000F (META_ESCAPE_ENHANCED_METAFILE) from the MetafileEscapes Enumeration (section 2.1.1.17).

ByteCount (2 bytes): A 16-bit unsigned integer that specifies the size, in bytes, of the record data that follows. This value MUST be 34 plus the value of the EnhancedMetafileDataSize field.

CommentIdentifier (4 bytes): A 32-bit unsigned integer that defines this record as a WMF Comment record. This value MUST be 0x43464D57.

CommentType (4 bytes): A 32-bit unsigned integer that identifies the type of comment in this record. This value MUST be 0x00000001.

Version (4 bytes): A 32-bit unsigned integer that specifies EMF metafile interoperability. This SHOULD be 0x00010000.<66>

Checksum (2 bytes): A 16-bit unsigned integer used to validate the correctness of the embedded EMF stream. This value MUST be the one's-complement of the result of applying an XOR operation to all WORD structures, defined in [MS-DTYP] section 2.2.61, in the EMF stream.

Flags (4 bytes): This 32-bit unsigned integer is unused and MUST be set to zero.

CommentRecordCount (4 bytes): A 32-bit unsigned integer that specifies the total number of consecutive META_ESCAPE_ENHANCED_METAFILE records that contain the embedded EMF metafile.

CurrentRecordSize (4 bytes): A 32-bit unsigned integer that specifies the size, in bytes, of the EnhancedMetafileData field. This value MUST be less than or equal to 8,192.

RemainingBytes (4 bytes): A 32-bit unsigned integer that specifies the number of bytes in the EMF stream that remain to be processed after this record. Those additional EMF bytes MUST follow in the EnhancedMetafileData fields of subsequent META_ESCAPE_ENHANDED_METAFILE escape records.

EnhancedMetafileDataSize (4 bytes): A 32-bit unsigned integer that specifies the total size of the EMF stream embedded in this sequence of META_ESCAPE_ENHANCED_METAFILE records.

EnhancedMetafileData (variable): A segment of an EMF file. The bytes in consecutive META_ESCAPE_ENHANCED_METAFILE records MUST be concatenated to represent the entire embedded EMF file.

See section 2.3.6 for the specification of other Escape Record Types.