2.2.1 Shared Message Header (SHARED_MSG_HEADER)

Every Remote Desktop Protocol: XPS Print Virtual Channel Extension packet contains a common header.


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

InterfaceId

MessageId

FunctionId (optional)

MessagePayload (variable)

...

InterfaceId (4 bytes): A 32-bit unsigned integer that represents the common identifier for the interface. The default value is 0x00000000, and if the message uses this default interface ID, it is interpreted as the main interface for which this channel has been instantiated. All other values MUST be retrieved either from an Interface Query message response (QI_RSP) or from responses that contain interface IDs. For example, in section 2.2.4.3.1.1 the Callback parameter describes an interface, and it represents an ID suitable for use as an interface ID in another set of request/reply sequences.

This ID is valid until an IFACE_RELEASE message is sent/received with that ID. After an IFACE_RELEASE message, this ID is considered invalid. A packet with an invalid InterfaceId causes channel termination from the packet parser on the receiving end.

MessageId (4 bytes): A 32-bit unsigned integer that represents a unique ID for the request and response pair. Requests and responses are matched, in part, based on this ID.

FunctionId (4 bytes): A 32-bit unsigned integer. This field MUST be present only in request packets. Its value is either used in interface manipulation messages or defined for a specific interface. The following values are categorized by the interface for which they are defined.

Common IDs for all interfaces are as follows.

Value

Meaning

RIMCALL_RELEASE

0x00000001

Release the given interface ID

RIMCALL_QUERYINTERFACE

0x00000002

Query for a new interface

Printer Ticket FunctionIds are as follows.

Value

Meaning

GET_SUPPORTED_VERSIONS_REQ

0x00000100

Server Get Supported Versions request

BIND_PRINTER_REQ

0x00000101

Server Bind Printer request

QUERY_DEV_NS_REQ

0x00000102

Server Query Device Namespace request

PRINT_TKT_TO_DEVMODE_REQ

0x00000103

Server Print Ticket to Devmode request

DEVMODE_TO_PRINT_TKT_REQ

0x00000104

Server Devmode to Print Ticket request

PRINT_CAPS_REQ

0x00000105

Server Print Caps request

PRINT_CAPS_FROM_PRINT_TKT_REQ

0x00000106

Server Print Caps From Print Ticket request

VALIDATE_PRINT_TKT_REQ

0x00000107

Server Validate Print Ticket request

Printer Driver FunctionIds are as follows.

Value

Meaning

INIT_PRINTER_REQ

0x00000100

Server Initialize Printer request

GET_ALL_DEV_CAPS_REQ

0x00000101

Server Get All Dev Caps request

CONVERT_DEVMODE_REQ

0x00000102

Server Convert Devmode request

GET_DEVICE_CAP_REQ

0x00000104

Server Get Device Capability request

DOC_PROPERTIES_REQ

0x00000105

Server Document Properties request

ASYNC_PRINTER_PROPS_REQ

0x00000107

Server Async Printer Properties request

CANCEL_ASYNC_PRINTER_PROPS_REQ

0x0000010A

Server Cancel Async Printer Properties request

ASYNC_DOC_PROPS_REQ

0x00000106

Server Async Document Properties request

CANCEL_ASYNC_DOC_PROPS_REQ

0x00000109

Server Cancel Async Document Properties request

MOVE_DOC_PROPERTIES_REQ

0x0000010B

Server Move Document Properties Window request

MXDC_GETPDEV_ADJUSTMENT_REQ

0x0000010C

Server Get Device Adjustments request

Printer Properties Callback FunctionIds are as follows.

Value

Meaning

PRINTER_PROPS_CALLBACK_REQ

0x00000100

Client Printer Properties Callback request

Document Properties Callback FunctionIds are as follows.

Value

Meaning

DOC_PROPS_CALLBACK_REQ

0x00000100

Client Document Properties Callback request

MessagePayload (variable): An array of unsigned 8-bit integers. The remainder of the message is interpreted based on the interface for which the packet is sent. This field is optional based on the packet length.