4 Protocol Examples

The following annotations describe several operations as used in common scenarios to illustrate the function of the Remote Desktop Protocol: XPS Print Virtual Channel Extension.

Printer setup sequence:

   (1) Initialize Printer Request
 ChannelName = XPSRD,16,server to client
 00000000 00 00 00 00 00 00 00 00 00 01 00 00 0d 00 00 00 ................
  
 00 00 00 00  -> InterfaceId = 0x00000000
 00 00 00 00  -> MessageId = 0x00000000
 00 01 00 00  -> INIT_PRINTER_REQ = 0x00000100
 0d 00 00 00  -> ClientPrinterId = 0x0000000d
  
  
 (2) Initialize Printer Response
 ChannelName = XPSRD,12,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (3) Get All Dev Caps Request
 ChannelName = XPSRD,12,server to client
 00000000 00 00 00 00 00 00 00 00 01 01 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 01 01 00 00 -> GET_ALL_DEV_CAPS_REQ = 0x00000101
  
  
 (4) Get All Dev Caps Response
 ChannelName = XPSRD,8564,client to server
 00000000 00 00 00 00 00 00 00 00 24 00 00 00 
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 24 00 00 00 -> numCaps = 0x00000024
  
                                              ff ff ff ff ........$.......
 00000010 00 00 00 00 00 00 00 00 
  
 ff ff ff ff -> TSDEVICE_CAPABILITIES: ReturnValue
 00 00 00 00 -> TSDEVICE_CAPABILITIES: ErrorCode = ERROR_SUCCESS
 00 00       -> TSDEVICE_CAPABILITIES: numBytes = 0
             -> TSDEVICE_CAPABILITIES: Data(variable length=0)
 00 00       -> TSDEVICE_CAPABILITIES: numBytes2 = 0
  
                                  53 ff 81 03 00 00 00 00 ........S.......
 00000020 00 00 00 00 
  
 53 ff 81 03 -> TSDEVICE_CAPABILITIES: ReturnValue = 0x0381ff53
 00 00 00 00 -> TSDEVICE_CAPABILITIES: ErrorCode = ERROR_SUCCESS
 00 00       -> TSDEVICE_CAPABILITIES: numBytes = 0
             -> TSDEVICE_CAPABILITIES: Data(variable length=0)
 00 00       -> TSDEVICE_CAPABILITIES: numBytes2 = 0
  
                      19 00 00 00 00 00 00 00 32 00 01 00 ............2...
 00000030 05 00 06 00 07 00 08 00 09 00 0b 00 0c 00 0d 00 ................
 00000040 11 00 14 00 18 00 1b 00 1c 00 22 00 25 00 42 00 ..........".%.B.
 00000050 52 00 81 00 84 00 87 00 94 00 5e 01 d7 01 ff 7f R.........^.....
 00000060 32 00 
  
 19 00 00 00 -> TSDEVICE_CAPABILITIES: ReturnValue
 00 00 00 00 -> TSDEVICE_CAPABILITIES: ErrorCode = ERROR_SUCCESS
 32 00       -> TSDEVICE_CAPABILITIES: numBytes = 0x32
             -> TSDEVICE_CAPABILITIES: Data (variable length=0x32)
 32 00       -> TSDEVICE_CAPABILITIES: numBytes2 = 0x32
  
  
 (skipped)
  
 00002160 00 00 14 01 00 00 15 01 00 00 16 01 00 00 5c 00 ..............\.
 00002170 00 00 00 00                                     ....
  
 00 00 00 00 - Result = S_OK
  
  
 (5) Server Convert Devmode Request
 ChannelName = XPSRD,28,server to client
 00000000 00 00 00 00 00 00 00 00 02 01 00 00 04 00 00 00 ................
 00000010 00 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 02 01 00 00 -> CONVERT_DEVMODE_REQ = 0x102
 04 00 00 00 -> CDM_DRIVER_DEFAULT = 0x4
 00 00 00 00 -> cbDevmodeIn = 0
             -> DevmodeIn (variable size=0)
 00 00 00 00 -> cbDevmodeOut = 0
             -> DevmodeOut (variable size=0)
 00 00 00 00 -> cbProvided = 0
  
  
 (6) Client Convert Devmode Response 
 ChannelName = XPSRD,28,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00 48 1f 00 00 ............H...
 00000010 00 00 00 00 7a 00 00 00 00 00 00 00             ....z.......
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> cbOutputBufferSize = 0
             -> OutputBuffer (variable size=0)
 48 1f 00 00 -> cbNeeded = 0x1f48
 00 00 00 00 -> ReturnValue
 7a 00 00 00 -> ErrorCode = ERROR_INSUFFICIENT_BUFFER
 00 00 00 00 -> Result = S_OK
  
  
 (7) Server Convert Devmode Request
 ChannelName = XPSRD,28,server to client
 00000000 00 00 00 00 00 00 00 00 02 01 00 00 04 00 00 00 ................
 00000010 00 00 00 00 00 00 00 00 48 1f 00 00             ........H...
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 02 01 00 00 -> CONVERT_DEVMODE_REQ = 0x102
 04 00 00 00 -> CDM_DRIVER_DEFAULT = 0x4
 00 00 00 00 -> cbDevmodeIn = 0
             -> DevmodeIn (variable size=0)
 00 00 00 00 -> cbDevmodeOut = 0
             -> DevmodeOut (variable size=0)
 48 1f 00 00 -> cbProvided = 0x1f48
  
  
 (8) Client Convert Devmode Response
 ChannelName = XPSRD,8036,client to server
 00000000 00 00 00 00 00 00 00 00 48 1f 00 00 5c 00 5c 00 ........H...\.\.
 00000010 43 00 53 00 52 00 7c 00 4d 00 53 00 50 00 52 00 C.S.R.|.M.S.P.R.
 00000020 49 00 4e 00 54 00 34 00 34 00 5c 00 7b 00 44 00 I.N.T.4.4.\.{.D.
 00000030 37 00 34 00 39 00 37 00 35 00 39 00 45 00 2d 00 7.4.9.7.5.9.E.-.
  
 (skipped)
  
                      48 1f 00 00 01 00 00 00 00 00 00 00 ....H...........
 00001f60 00 00 00 00                                     ....
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 48 1f 00 00 -> cbOutputBufferSize = 0x1f48
             -> OutputBuffer (variable size=0x1f48)
 48 1f 00 00 -> cbNeeded = 0x1f48
 01 00 00 00 -> ReturnValue
 00 00 00 00 -> ErrorCode = ERROR_SUCCESS
 00 00 00 00 -> Result = S_OK

Document Properties User Interface sequence:

  
   (1) Initialize Printer Request
 ChannelName = XPSRD,16,server to client
 00000000 00 00 00 00 00 00 00 00 00 01 00 00 0d 00 00 00 ................
  
 00 00 00 00  -> InterfaceId = 0x00000000
 00 00 00 00  -> MessageId = 0x00000000
 00 01 00 00  -> INIT_PRINTER_REQ = 0x00000100
 0d 00 00 00  -> ClientPrinterId = 0x0000000d
  
  
 (2) Initialize Printer Response
 ChannelName = XPSRD,12,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (3) Server Document Properties Request
 ChannelName = XPSRD,32,server to client
 00000000 00 00 00 00 00 00 00 00 05 01 00 00 00 00 00 00 ................
 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 05 01 00 00 -> DOC_PROPERTIES_REQ = 0x00000105
 00 00 00 00 -> fMode = 0
 00 00 00 00 00 00 00 00 -> hServerWindow = 0
 00 00 00 00 -> cbDevmodeIn
             -> DevmodeIn
 00 00 00 00 -> OutputDevModeSizeProvided
  
  
 (4) Client Document Properties Response
 ChannelName = XPSRD,24,client to server
 00000000 00 00 00 00 00 00 00 00 48 1f 00 00 00 00 00 00 ........H.......
 00000010 00 00 00 00 00 00 00 00                         ........
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 48 1f 00 00 -> ReturnValue = 0x1f48
 00 00 00 00 -> ErrorCode = ERROR_SUCCESS
 00 00 00 00 -> cbOutDevModeSize = 0
             -> OutDevMode (variable size=0)
 00 00 00 00 -> Result = S_OK
  
  
 (5) Server Document Properties Request
 ChannelName = XPSRD,32,server to client
 00000000 00 00 00 00 00 00 00 00 05 01 00 00 02 00 00 00 ................
 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 ................
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 05 01 00 00 -> DOC_PROPERTIES_REQ = 0x00000105
 02 00 00 00 -> fMode = DM_OUT_BUFFER
 00 00 00 00 00 00 00 00 -> hServerWindow = 0
 00 00 00 00 -> cbDevmodeIn
             -> DevmodeIn
 00 00 01 00 -> OutputDevModeSizeProvided = 0x100000
  
  
 (6) Client Document Properties Response
 ChannelName = XPSRD,8032,client to server
 00000000 00 00 00 00 00 00 00 00 01 00 00 00 7a 00 00 00 ............z...
 00000010 48 1f 00 00 5c 00 5c 00 4d 00 53 00 50 00 52 00 H...\.\.M.S.P.R.
 00000020 49 00 4e 00 54 00 34 00 34 00 5c 00 62 00 34 00 I.N.T.4.4.\.b.4.
  
 (skipped)
  
 00001f50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 01 00 00 00 -> ReturnValue = 1
 7a 00 00 00 -> ErrorCode = ERROR_INSUFFICIENT_BUFFER
 48 1f 00 00 -> cbOutDevModeSize = 0x1f48
             -> OutDevMode (variable size=0x1f48)
 00 00 00 00 -> Result = S_OK
  
  
 (7) Server Async Document Properties Request
 ChannelName = XPSRD,8048,server to client
 00000000 00 00 00 00 00 00 00 00 06 01 00 00 4e 00 00 00 ............N...
 00000010 2c 02 06 00 00 00 00 00 48 1f 00 00 62 00 34 00 ,.......H...b.4.
 00000020 33 00 2d 00 32 00 38 00 36 00 36 00 2d 00 61 00 3.-.2.8.6.6.-.a.
 00000030 20 00 6f 00 6e 00 20 00 4d 00 53 00 50 00 52 00  .o.n. .M.S.P.R.
  
 (skipped)
  
 00001f60 00 00 00 00 00 00 01 00 01 00 00 00 01 00 00 00 ................
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 06 01 00 00 -> ASYNC_DOC_PROPS_REQ = 0x106
 4e 00 00 00 -> fMode = DM_IN_BUFFER | DM_OUT_BUFFER | 
                        DM_IN_PROMPT | DM_USER_DEFAULT
 2c 02 06 00 00 00 00 00 -> hServerWindow = 0x6022c
 48 1f 00 00 -> cbDevmodeIn = 0x1f48
             -> DevmodeIn (variable size=0x1f48)
 00 00 01 00 -> OutputDevModeSize = 0x100000
 01 00 00 00 -> NumCallbacks = 1
 01 00 00 00 -> Callback = 1
  
  
 (8) Client Async Document Properties Response
 ChannelName = XPSRD,12,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (9) Client Document Properties Callback Request
 ChannelName = XPSRD,8032,client to server
 00000000 01 00 00 00 00 00 00 00 00 01 00 00 01 00 00 00 ................
 00000010 00 00 00 00 48 1f 00 00 5c 00 5c 00 4d 00 53 00 ....H...\.\.M.S.
 00000020 50 00 52 00 49 00 4e 00 54 00 34 00 34 00 5c 00 P.R.I.N.T.4.4.\.
  
 (skipped)
  
 00001f50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 00 01 00 00 -> DOC_PROPS_CALLBACK_REQ = 0x100
 01 00 00 00 -> ReturnValue = 1
 00 00 00 00 -> ErrorCode = ERROR_SUCCESS
 48 1f 00 00 -> cbDevmode = 0x1f48
             -> Devmode (variable size=0x1f48)
  
  
 (10) Server Document Properties Callback Response
 ChannelName = XPSRD,12,server to client
 00000000 01 00 00 00 00 00 00 00 00 00 00 00             ............
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Reserved = 0x00000000
  
  
 (11) Client to Server Interface release
 ChannelName = XPSRD,12,client to server
 00000000 01 00 00 00 00 00 00 00 01 00 00 00             ............
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 01 00 00 00 -> RIMCALL_RELEASE = 0x00000001

Printer Properties User Interface sequence:

 (1) Server Async Printer Properties Request
 ChannelName = XPSRD,32,server to client
 00000000 00 00 00 00 00 00 00 00 07 01 00 00 01 00 00 00 ................
 00000010 16 01 21 00 00 00 00 00 01 00 00 00 01 00 00 00 ..!.............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 07 01 00 00 -> ASYNC_PRINTER_PROPS_REQ = 0x107
 01 00 00 00 -> Flags = XPSREDIR_PRINTER_PROPERTIES_Flags_NO_PERMISSION
 16 01 21 00 00 00 00 00 -> hServerWindow = 0x210116
 01 00 00 00 -> Reserved = 0x00000001
 01 00 00 00 -> Callback = 0x00000001 
  
  
 (2) Client Async Printer Properties Response
 ChannelName = XPSRD,12,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (3) Client Printer Properties Callback Request
 ChannelName = XPSRD,20,client to server
 00000000 01 00 00 00 00 00 00 00 00 01 00 00 01 00 00 00 ................
 00000010 00 00 00 00                                     ....
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 00 01 00 00 -> PRINTER_PROPS_CALLBACK_REQ = 0x100
 01 00 00 00 -> ReturnValue = 1
 00 00 00 00 -> ErrorCode = ERROR_SUCCESS
  
  
 (4) Server Printer Properties Callback Response
 ChannelName = XPSRD,12,server to client
 00000000 01 00 00 00 00 00 00 00 00 00 00 00             ............
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Reserved = 0x00000000
  
  
 (5) Client to Server Interface release
 ChannelName = XPSRD,12,client to server
 00000000 01 00 00 00 00 00 00 00 01 00 00 00             ............
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 01 00 00 00 -> RIMCALL_RELEASE = 0x00000001

Document Properties User Interface sequence (canceled):

  
   (1) Server Async Document Properties Request
 ChannelName = XPSRD,8048,server to client
 00000000 00 00 00 00 00 00 00 00 06 01 00 00 4e 00 00 00 ............N...
 00000010 fa 01 07 00 00 00 00 00 48 1f 00 00 62 00 34 00 ........H...b.4.
 00000020 33 00 2d 00 32 00 38 00 36 00 36 00 2d 00 61 00 3.-.2.8.6.6.-.a.
 00000030 20 00 6f 00 6e 00 20 00 4d 00 53 00 50 00 52 00  .o.n. .M.S.P.R.
  
 (skipped)
  
 00001f60 00 00 00 00 00 00 01 00 01 00 00 00 01 00 00 00 ................
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 06 01 00 00 -> ASYNC_DOC_PROPS_REQ = 0x106
 4e 00 00 00 -> fMode = DM_IN_BUFFER | DM_OUT_BUFFER | 
                        DM_IN_PROMPT | DM_USER_DEFAULT
 fa 01 07 00 00 00 00 00 -> hServerWindow = 0x701fa
 48 1f 00 00 -> cbDevmodeIn = 0x1f48
             -> DevmodeIn (variable size=0x1f48)
 00 00 00 01 00 -> OutputDevModeSize = 0x100000
 01 00 00 00 -> NumCallbacks = 1
 01 00 00 00 -> Callback = 1
  
  
 (2) Client Async Document Properties Response
 ChannelName = XPSRD,12,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (3) Server Cancel Async Document Properties Request
 ChannelName = XPSRD,12,server to client
 00000000 00 00 00 00 00 00 00 00 09 01 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 09 01 00 00 -> CANCEL_ASYNC_DOC_PROPS_REQ = 0x109
  
  
 (4) Client Document Properties Callback Request
 ChannelName = XPSRD,8032,client to server
 00000000 01 00 00 00 00 00 00 00 00 01 00 00 02 00 00 00 ................
 00000010 00 00 00 00 48 1f 00 00 00 00 00 00 00 00 00 00 ....H...........
 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  
 (skipped)
  
 00001f50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 00 01 00 00 -> DOC_PROPS_CALLBACK_REQ = 0x100
 02 00 00 00 -> ReturnValue = 2
 00 00 00 00 -> ErrorCode = ERROR_SUCCESS
 48 1f 00 00 -> cbDevmode = 0x1f48
             -> Devmode (variable size=0x1f48)
  
  
 (5) Server Document Properties Callback Response
 ChannelName = XPSRD,12,server to client
 00000000 01 00 00 00 00 00 00 00 00 00 00 00             ............
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (6) Client Cancel Async Document Properties Response
 ChannelName = XPSRD,12,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (7) Client to Server Interface release
 ChannelName = XPSRD,12,client to server
 00000000 01 00 00 00 00 00 00 00 01 00 00 00             ............
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 01 00 00 00 -> RIMCALL_RELEASE = 0x00000001

Printer Properties User Interface sequence (canceled):

 (1) Server Async Printer Properties Request
 ChannelName = XPSRD,32,server to client
 00000000 00 00 00 00 00 00 00 00 07 01 00 00 01 00 00 00 ................
 00000010 16 01 21 00 00 00 00 00 01 00 00 00 01 00 00 00 ..!.............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 07 01 00 00 -> ASYNC_PRINTER_PROPS_REQ = 0x107
 01 00 00 00 -> Flags = XPSREDIR_PRINTER_PROPERTIES_Flags_NO_PERMISSION
 16 01 21 00 00 00 00 00 -> hServerWindow = 0x210116
 01 00 00 00 -> NumCallbacks
 01 00 00 00 -> Callback
  
  
 (2) Client Async Printer Properties Response
 ChannelName = XPSRD,12,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (3) Server Cancel Async Printer Properties Request
 ChannelName = XPSRD,12,server to client
 00000000 00 00 00 00 00 00 00 00 0a 01 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 0a 01 00 00 -> CANCEL_ASYNC_PRINTER_PROPS_REQ = 0x10a
  
  
 (4) Client Printer Properties Callback Request
 ChannelName = XPSRD,20,client to server
 00000000 01 00 00 00 00 00 00 00 00 01 00 00 01 00 00 00 ................
 00000010 00 00 00 00                                     ....
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 00 01 00 00 -> PRINTER_PROPS_CALLBACK_REQ = 0x100
 01 00 00 00 -> ReturnValue = 1
 00 00 00 00 -> ERROR_SUCCESS
  
  
 (5) Server Printer Properties Callback Response
 ChannelName = XPSRD,12,server to client
 00000000 01 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (7) Client Cancel Async Printer Properties Response
 ChannelName = XPSRD,12,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Result = S_OK
  
  
 (8) Client to Server Interface release
 ChannelName = XPSRD,12,client to server
 00000000 01 00 00 00 00 00 00 00 01 00 00 00             ............
  
 01 00 00 00 -> InterfaceId (id of Callback) = 0x00000001
 00 00 00 00 -> MessageId = 0x00000000
 01 00 00 00 -> RIMCALL_RELEASE = 0x00000001
  
  

Printing a document sequence:

  
   (1) Server Document Properties Request
 ChannelName = XPSRD,32,server to client
 00000000 00 00 00 00 00 00 00 00 05 01 00 00 00 00 00 00 ................
 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 05 01 00 00 -> DOC_PROPERTIES_REQ = 0x105
 00 00 00 00 -> fMode = 0
 00 00 00 00 00 00 00 -> hServerWindow = 0
 00 00 00 00 -> cbDevmodeIn = 0
             -> DevmodeIn (variable size=0)
 00 00 00 00 -> OutputDevModeSizeProvided = 0
  
  
 (2) Client Document Properties Response
 ChannelName = XPSRD,24,client to server
 00000000 00 00 00 00 00 00 00 00 48 1f 00 00 00 00 00 00 ........H.......
 00000010 00 00 00 00 00 00 00 00                         ........
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 48 1f 00 00 -> ReturnValue = 0x1f48
 00 00 00 00 -> ErrorCode = ERROR_SUCCESS
 00 00 00 00 -> cbOutDevModeSize = 0
             -> OutDevMode (variable size=0)
 00 00 00 00 -> Result = S_OK
  
  
 (3) Server Get Supported Versions Request
 ChannelName = TSVCTKT,16,server to client
 00000000 00 00 00 00 00 00 00 00 00 01 00 00 0d 00 00 00 ................
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 01 00 00 -> GET_SUPPORTED_VERSIONS_REQ = 0x100
 0d 00 00 00 -> ClientPrinterId = 0xd
  
  
 (4) Client Get Supported Versions Response
 ChannelName = TSVCTKT,20,client to server
 00000000 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 ................
 00000010 00 00 00 00                                     ....
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 01 00 00 00 -> NumVersions = 1
 01 00 00 00 -> Versions (variable size=NumVersions * sizeof(UINT32) = 4)
                Versions[0] = 1
 00 00 00 00 -> Result = S_OK
  
  
 (5) Server Bind Printer Request
 ChannelName = TSVCTKT,20,server to client
 00000000 00 00 00 00 00 00 00 00 01 01 00 00 0d 00 00 00 ................
 00000010 01 00 00 00                                     ....
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 01 01 00 00 -> BIND_PRINTER_REQ = 0x101
 0d 00 00 00 -> ClientPrinterId = 0xd
 01 00 00 00 -> Version = 1
  
  
 (6) Client Bind Printer Response
 ChannelName = TSVCTKT,24,client to server
 00000000 00 00 00 00 00 00 00 00 00 00 00 00 0f f6 80 03 ................
 00000010 00 00 00 00 00 00 00 00                         ........
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 00 00 00 -> Options = PTSHIM_DEFAULT
 0f f6 80 03 -> DevModeFlags = 0x0380f60f =
                 DM_MEDIATYPE|DM_ICMINTENT|DM_ICMMETHOD|DM_DUPLEX|
                 DM_YRESOLUTION|DM_TTOPTION|DM_COLLATE|
                 DM_DEFAULTSOURCE|DM_PRINTQUALITY|DM_ORIENTATION|
                 DM_PAPERSIZE|DM_PAPERLENGTH|DM_PAPERWIDTH
  
 00 00 00 00 -> NumNamespaces = 0
             -> Namespaces (variable size=0)
 00 00 00 00 -> Result = S_OK
  
  
 (7) Server Query Device Namespace Request
 ChannelName = TSVCTKT,12,server to client
 00000000 00 00 00 00 00 00 00 00 02 01 00 00             ............
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 02 01 00 00 -> QUERY_DEV_NS_REQ = 0x102
  
  
 (8) Client Query Device Namespace Response
 ChannelName = TSVCTKT,83,client to server
 00000000 00 00 00 00 00 00 00 00 00 68 00 74 00 74 00 70 .........h.t.t.p
 00000010 00 3a 00 2f 00 2f 00 77 00 77 00 77 00 2e 00 68 .:././.w.w.w...h
 00000020 00 70 00 2e 00 63 00 6f 00 6d 00 2f 00 70 00 72 .p...c.o.m./.p.r
 00000030 00 69 00 6e 00 74 00 73 00 63 00 68 00 65 00 6d .i.n.t.s.c.h.e.m
 00000040 00 61 00 2f 00 32 00 30 00 30 00 35 00 00 00 00 .a./.2.0.0.5....
 00000050 00 00 00                                        ...
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00          -> is_null_flag = 0 (not null)
             -> DefaultNamespace(not null) = 
                      L"http://www.hp.com/printschema/2005"
 00 00 00 00 -> Result = S_OK
  
  
 (9) Server Devmode to Print Ticket Request
 ChannelName = TSVCTKT,19502,server to client
 00000000 00 00 00 00 00 00 00 00 04 01 00 00 48 1f 00 00 ............H...
 00000010 62 00 34 00 33 00 2d 00 32 00 38 00 36 00 36 00 b.4.3.-.2.8.6.6.
 00000020 2d 00 61 00 20 00 6f 00 6e 00 20 00 4d 00 53 00 -.a. .o.n. .M.S.
 00000030 50 00 52 00 49 00 4e 00 54 00 34 00 34 00 20 00 P.R.I.N.T.4.4. .
 (skipped)
 00001f50 00 00 00 00 00 00 00 00 d2 2c 00 00 3c 3f 78 6d .........,..<?xm       
 00001f60 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 l version="1.0"        
 00001f70 65 6e 63 6f 64 69 6e 67 3d 22 55 54 46 2d 38 22 encoding="UTF-8"       
 00001f80 3f 3e 0d 0a 3c 70 73 66 3a 50 72 69 6e 74 54 69 ?>..<psf:PrintTi       
 (skipped)
 00004c20 50 72 69 6e 74 54 69 63 6b 65 74 3e 0d 0a       PrintTicket>..
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 04 01 00 00 -> DEVMODE_TO_PRINT_TKT_REQ = 0x104
 48 1f 00 00 -> cbDevmodeIn = 0x1f48
             -> pDevmodeIn (variable size=0x1f48)
  
 (continuing at offset 0x00001f58)
 d2 2c 00 00 -> XML_DOCUMENT:cbXMLSize = 0x2cd2
             -> XML_DOCUMENT:XMLDocument (variable size=0x2cd2)
  
  
 (10) Client Devmode to Print Ticket Response
 ChannelName = TSVCTKT,15431,client to server
 00000000 00 00 00 00 00 00 00 00 00 36 3c 00 00 3c 3f 78 .........6<..<?x
 00000010 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 ml version="1.0"
 00000020 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 46 2d 38  encoding="UTF-8
 00000030 22 3f 3e 0d 0a 3c 70 73 66 3a 50 72 69 6e 74 54 "?>..<psf:PrintT
  
 (skipped)
  
 00003c30 2f 70 73 66 3a 50 72 69 6e 74 54 69 63 6b 65 74 /psf:PrintTicket
 00003c40 3e 0d 0a 00 00 00 00                            >......
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00          -> is_null_flag = 0 (not null)
 36 3c 00 00 -> XML_DOCUMENT:cbXMLSize = 0x3c36
             -> XML_DOCUMENT:XMLDocument (variable size=0x3c36)
 00 00 00 00 -> Result = S_OK
  
  
 (11) Server Get Device Capability Request
 ChannelName = XPSRD,22,server to client
 00000000 00 00 00 00 00 00 00 00 04 01 00 00 00 00 00 00 ................
 00000010 0b 00 00 00 00 00                               ......
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 04 01 00 00 -> GET_DEVICE_CAP_REQ = 0x104
 00 00 00 00 -> cbDevmodeIn = 0
             -> DevmodeIn (variable size=0)
 0b 00       -> DeviceCap
 00 00 00 00 -> InputBufferSize = 0
  
  
 (12) Client Get Device Capability Response
 ChannelName = XPSRD,20,client to server
 00000000 00 00 00 00 00 00 00 00 00 06 00 00 00 00 00 00 ................
 00000010 00 00 00 00                                     ....
  
 00 00 00 00 -> InterfaceId = 0x00000000
 00 00 00 00 -> MessageId = 0x00000000
 00 06 00 00 -> ReturnValue = 0x600
 00 00 00 00 -> cbOutputBufferSize = 0
             -> OutputBuffer (variable size=0)
 00 00 00 00 -> Result = S_OK
Show: