2.2.4.2.4 Client Convert Devmode Response (CONVERT_DEVMODE_RSP)

The CONVERT_DEVMODE_RSP response is a reply to a CONVERT_DEVMODE_REQ request message. The client-side printer driver converts the DEVMODE supplied in the request to the requested format. The resultant DEVMODE BLOB is returned by this message.


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)

...

cbOutputBufferSize

OutputBuffer (variable)

...

cbNeeded

ReturnValue

ErrorCode

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 CONVERT_DEVMODE_REQ request message.

cbOutputBufferSize (4 bytes): A 32-bit unsigned integer. This field MUST contain the number of bytes in the following OutputBuffer field. This value MUST NOT be larger than the value contained in the cbProvided field of the corresponding CONVERT_DEVMODE_REQ request message.

OutputBuffer (variable): An array of 8-bit unsigned integers. The content is generated by the client printer driver and is treated as payload in this protocol.

cbNeeded (4 bytes): This value MUST be greater than or equal to the value of the cbOutputBufferSize field. If the value of cbOutputBufferSize is less than the value contained in the cbProvided field in the CONVERT_DEVMODE_REQ request, the value of cbNeeded indicates the real size of the requested data.

ReturnValue (4 bytes): A 32-bit unsigned integer. This value is used to determine the failure or success of the request. ReturnValue MUST contain one of the following values.

Value

Meaning

FALSE

0x00000000

The request failed. The following ErrorCode field contains a valid WIN32 error code.

TRUE

0x00000001

The request succeeded. The following ErrorCode field is equal to ERROR_SUCCESS (0x00000000).

ErrorCode (4 bytes): A WIN32 error code for the request.

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