2.3.6 Escape Record Types

The Escape record types execute printer driver functions.

The following are EMF escape record types.

Name

Section

Description

EMR_DRAWESCAPE

2.3.6.1

Passes arbitrary information to the printer driver. The intent is that the information results in drawing being done.

EMR_EXTESCAPE

2.3.6.2

Passes arbitrary information to the printer driver. The intent is that the information does not result in drawing being done.

EMR_NAMEDESCAPE

2.3.6.3

Passes arbitrary information to the given named printer driver.

The generic structure of escape 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

iEscape

EscapeRecordBuffer (variable)

...

Type (4 bytes): An unsigned integer that defines the type of the record. The escape record types are listed in the following table. See the preceding table for descriptions of these records.

Name

Value

EMR_DRAWESCAPE

0x00000069

EMR_EXTESCAPE

0x0000006A

EMR_NAMEDESCAPE

0x0000006E

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.

iEscape (4 bytes): An unsigned integer that specifies the printer driver escape to execute. This MUST be one of the values in the MetafileEscapes enumeration ([MS-WMF] section 2.1.1.17).

EscapeRecordBuffer (variable): An array of bytes that contains the remainder of the escape 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

EscapeRecordParm (variable)

...

AlignmentPadding (variable, optional)

...

EscapeRecordParm (variable): An array of bytes that contains the parameters for the escape 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.