2.1.6 DEVMODEA

This structure is identical to the DEVMODE structure specified in [MS-RPRN] section 2.2.1.1.1, except for the dmDeviceName and dmFormName fields:


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

dmDeviceName (32 bytes)

...

...

dmFormName (32 bytes)

...

...

dmSpecVersion

dmDriverVersion

dmSize

dmDriverExtra

dmFields

dmOrientation

dmPaperSize

dmPaperLength

dmPaperWidth

dmScale

dmCopies

dmDefaultSource

dmPrintQuality

dmColor

dmDuplex

dmYResolution

dmTTOption

dmCollate

reserved0

reserved1

reserved2

reserved3

dmNup

reserved4

dmICMMethod

dmICMIntent

dmMediaType

dmDitherType

reserved5

reserved6

reserved7

reserved8

dmDeviceName (32 bytes): This field is a 32-element array of 8-bit ANSI characters.

dmFormName (32 bytes): This field is a 32-element array of 8-bit ANSI characters.

dmSpecVersion (2 bytes): The version of initialization data specification on which the DEVMODE structure is based.

dmDriverVersion (2 bytes): For printers, an optional, implementation-defined version of the printer driver.

dmSize (2 bytes): The size, in bytes, of the DEVMODE structure. The size MUST NOT include the length of any private, printer driver–specific data that might follow the DEVMODE structure's public fields.

dmDriverExtra (2 bytes): The size, in bytes, of the private printer driver data that follows this structure.

dmFields (4 bytes): A bitfield that specifies the fields of the DEVMODE structure that have been initialized. If a bit is set, the corresponding field MUST be initialized and MUST be processed on receipt. If a bit is not set, the value of the corresponding field SHOULD be set to zero and MUST be ignored on receipt.

dmOrientation (2 bytes): For printers, the orientation for output. If the DM_ORIENTATION bit is set in dmFields, this value MUST be specified.

dmPaperSize (2 bytes): For printers, the size of the output media. If the DM_PAPERSIZE bit is set in dmFields, this value MUST be specified. The value of this field SHOULD be one of the following, or it MAY be a device-specific value that is greater than or equal to 0x0100.

dmPaperLength (2 bytes): If the DM_PAPERLENGTH bit is set in the dmFields field, the value of this field specifies the length of the paper, in tenths of a millimeter, to use in the printer for which the job is destined.

dmPaperWidth (2 bytes): If the DM_PAPERWIDTH bit is set in the dmFields field, the value of this field specifies the width of the paper, in tenths of a millimeter, to use in the printer for which the job is destined.

dmScale (2 bytes): If the DM_SCALE bit is set in the dmFields field, the value of this field specifies the percentage factor by which the printed output is to be scaled.

dmCopies (2 bytes): If the DM_COPIES bit is set in the dmFields field, the value of this field specifies the number of copies to be printed, if the device supports multiple-page copies.

dmDefaultSource (2 bytes): If the DM_DEFAULTSOURCE bit is set in the dmFields field, the value of this field specifies the paper source.

dmPrintQuality (2 bytes): If the DM_PRINTQUALITY bit is set in the dmFields field, the value of this field specifies the printer resolution. The value of this field MUST be either a positive value that specifies a device-dependent resolution in dots per inch (DPI) or one of the following four predefined device-independent values that are mapped to a device-specific resolution in an implementation-specific manner.

dmColor (2 bytes): If the DM_COLOR bit is set in the dmFields field, the value of this field specifies the color mode to use with color printers.

dmDuplex (2 bytes): If the DM_DUPLEX bit is set in the dmFields field, the value of this field specifies duplex or double-sided printing for printers that are capable of duplex printing.

dmYResolution (2 bytes): If the DM_YRESOLUTION bit is set in the dmFields, the value of this field specifies the y-resolution, in dots per inch, of the printer.

dmTTOption (2 bytes): If the DM_TTOPTION bit is set in the dmFields field, the value of this field specifies how TrueType fonts MUST be printed.

dmCollate (2 bytes): If the DM_COLLATE bit is set in the dmFields field, the value of this field specifies whether collation MUST be used when printing multiple copies.

reserved0 (2 bytes): A value that SHOULD be zero and MUST be ignored on receipt.

reserved1 (4 bytes): A value that SHOULD be zero and MUST be ignored on receipt.

reserved2 (4 bytes): A value that SHOULD be zero and MUST be ignored on receipt.

reserved3 (4 bytes): A value that SHOULD be zero and MUST be ignored on receipt.

dmNup (4 bytes): If the DM_NUP bit is set in the dmFields, the value of this field specifies the responsibility for performing page layout for N-Up Printing.

reserved4 (4 bytes): A value that SHOULD be zero and MUST be ignored on receipt.

dmICMMethod (4 bytes): If the DM_ICMMETHOD bit is set in the dmFields field, the value of this field specifies how Image Color Management (ICM) is handled. For a non-ICM application, this field determines if ICM is enabled or disabled. For ICM applications, the system examines this field to determine how to handle ICM support. For values see [MS-RPRN]section 2.2.2.1.

dmICMIntent (4 bytes): If the DM_ICMINTENT bit is set in the dmFields field, the value of this field specifies which color matching method, or intent, MUST be used by default. This field is primarily for non-ICM applications. ICM applications can establish intents by using the ICM functions. For values see [MS-RPRN]section 2.2.2.1.

dmMediaType (4 bytes): If the DM_MEDIATYPE bit is set in the dmFields field, the value of this field specifies the type of media to print on. For values see [MS-RPRN]section 2.2.2.1.

dmDitherType (4 bytes): If the DM_DITHERTYPE bit is set in the dmFields field, the value of this field specifies how dithering is to be done. For values see [MS-RPRN]section 2.2.2.1.

reserved5 (4 bytes): A value that SHOULD be zero and MUST be ignored on receipt.

reserved6 (4 bytes): A value that SHOULD be zero and MUST be ignored on receipt.

reserved7 (4 bytes): A value that SHOULD be zero and MUST be ignored on receipt.

reserved8 (4 bytes): A value that SHOULD be zero and MUST be ignored on receipt.