126.96.36.199 Processing an RDPGFX_WIRE_TO_SURFACE_PDU_2 message
The structure and fields of the RDPGFX_WIRE_TO_SURFACE_PDU_2 message are specified in section 188.8.131.52. The header field MUST be processed as specified in section 184.108.40.206. The surfaceId field MUST identify a valid offscreen surface in the Offscreen Surface (section 220.127.116.11) ADM element, and the size of the bitmap data specified in the bitmapDataLength field MUST be consistent with the amount of data read from the "Microsoft::Windows::RDS::Graphics" dynamic virtual channel (section 2.1). If there is no codec context identified by the codecContextId field in the Codec Contexts (section 18.104.22.168) ADM element, the client MUST create a new context, place it into the Codec Contexts ADM element, and begin the process of progressively rendering a bitmap from the data in the bitmapData field, as specified by the encoding type enumerated value in the codecId field, using the context to store intermediate state. The bitmap SHOULD be copied to the target surface using a SRCCOPY ROP3 operation ([MS-RDPEGDI] section 22.214.171.124.126.96.36.199) once enough data has been decoded to render a discernible image and SHOULD then continue to be updated as subsequent RDPGFX_WIRE_TO_SURFACE_PDU_2 messages are processed. Note that if the type (specified in the blockType field) of the current RFX_PROGRESSIVE_DATABLOCK structure (section 188.8.131.52.1) of an RFX_PROGRESSIVE_BITMAP_STREAM (section 184.108.40.206) is WBT_TILE_PROGRESSIVE_UPGRADE (0xCCC7), then the codecContextId field in the Codec Contexts (section 220.127.116.11) ADM element MUST be known.