2.2.4.2.8 Client Document Properties Response (DOC_PROPERTIES_RSP)

This message is sent in response to the DOC_PROPERTIES_REQ (Server Document Properties Request). It contains the DEVMODE BLOB that was supplied by the client printer driver.


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

Header (variable)

...

ReturnValue

ErrorCode

cbOutDevModeSize

OutDevMode (variable)

...

Result

Header (variable): The common message header (as specified in section 2.2.1). The InterfaceId field and the MessageId field in this message header MUST contain the same values as the InterfaceId and MessageId fields in the corresponding DOC_PROPERTIES_REQ request message.

ReturnValue (4 bytes): A 32-bit signed integer. If the fMode field of the DOC_PROPERTIES_REQ message was set to 0, this field MUST use one and only one of the following values.

Value

Meaning

0x00000000

The data that the client printer driver has to return is not greater than the value of the OutputDevModeSizeProvided field of the corresponding DOC_PROPERTIES_REQ request message. In this case, the OutDevMode field contains the aforementioned data, and the cbOutDevModeSize field contains the data size.

0x00000001 — 0x7fffffff

The size of the data that the client printer driver has to return in the OutDevMode field if its size is greater than the value of the OutputDevModeSizeProvided field of the corresponding DOC_PROPERTIES_REQ request message. In this case, the OutDevMode field MUST be empty and the cbOutDevModeSize field MUST be zero.

0x80000000 — 0xffffffff

Any negative value for ReturnValue indicates that the contents of the OutDevMode field cannot be provided because of an error. An error-specific code is provided in the ErrorCode field.

If the fMode field of the DOC_PROPERTIES_REQ message was not set to 0, this field MUST use one and only one of the following values.

Value

Meaning

0x00000000

The call was canceled by the user. The content in OutDevMode MUST be ignored. Identical in meaning to values in the range 0x00000002 to 0x7fffffff.

0x00000001

The call was successful and OutDevMode contains the data as it is returned by the client printer driver.

0x00000002 — 0x7fffffff

The call was canceled by the user. The content in OutDevMode MUST be ignored. Identical in meaning to 0x00000000.

0x80000000 — 0xffffffff

The contents of the OutDevMode field cannot be provided because of an error.

ErrorCode (4 bytes): A WIN32 error code returned from the client printer. If the ReturnValue is not set to 0xffffffff, this value of field MUST be ignored.

cbOutDevModeSize (4 bytes): A 32-bit unsigned integer. This field MUST contain the number of bytes in the OutDevMode field.

OutDevMode (variable): An array of 8-bit unsigned integers. The content is generated by the client printer driver and is treated as payload in the Printer Driver Interface.

Result (4 bytes): An HRESULT that describes the result of the call.