2.3.3 Comment Record Types

The Comment record types define formats for specifying arbitrary private data, embedding records in other metafile formats, and adding new or special-purpose commands.

The following are EMF comment record types.

Name

Section

Description

EMR_COMMENT

2.3.3.1

Contains arbitrary private data.

EMR_COMMENT_EMFPLUS

2.3.3.2

Contains embedded EMF+ records ([MS-EMFPLUS] section 2.3).

EMR_COMMENT_EMFSPOOL

2.3.3.3

Contains embedded EMFSPOOL records ([MS-EMFSPOOL] section 2.2).

EMR_COMMENT_PUBLIC

2.3.3.4

Specifies extensions to EMF processing.

The generic structure of comment records is specified as follows.


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

Type

Size

DataSize

CommentRecordBuffer (variable)

...

Type (4 bytes): An unsigned integer from the RecordType enumeration (section 2.1.1) that identifies this record as a comment record. This value is 0x00000046.

Size (4 bytes): An unsigned integer that specifies the size in bytes of this record in the metafile. This value MUST be a multiple of 4 bytes.

DataSize (4 bytes): An unsigned integer that specifies the size in bytes, of the CommentIdentifier and CommentRecordParm fields in the RecordBuffer field that follows. It MUST NOT include the size of itself or the size of the AlignmentPadding field, if present.

CommentRecordBuffer (variable): An array of bytes that contains the remainder of the comment record.


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

CommentIdentifier (optional)

CommentRecordParm (variable)

...

AlignmentPadding (variable, optional)

...

CommentIdentifier (4 bytes, optional): An unsigned integer that identifies the type of comment record. See the preceding table for descriptions of these record types.

Valid comment identifier values are listed in the following table. If this field contains any other value, the comment record is processed as an EMR_COMMENT record.

Name

Value

EMR_COMMENT_EMFSPOOL

0x00000000

EMR_COMMENT_EMFPLUS

0x2B464D45

EMR_COMMENT_PUBLIC

0x43494447

CommentRecordParm (variable): An array of bytes that contains the parameters for the comment record.

AlignmentPadding (variable, optional): An array of up to 3 bytes that pads the record so that its total size is a multiple of 4 bytes. This field MUST be ignored.

See section 2.3 for more EMF record types.