3.1.5.4.6 Processing a File Contents Request PDU

The fields of the Format Data Response PDU are specified in section 2.2.5.2.

The clipHeader field MUST be processed as specified in section 3.1.5.1. If the PDU is valid, the data requested for the file (specified by the lindex field) MUST be returned to the sender. If the clipDataId field is present, then the locked File Stream data associated with the ID MUST be used to service the request.

The recipient of the File Contents Request PDU MUST perform a lookup using the lindex field to find the file that is the target of the request. The lookup most likely involves accessing the File List with which the current transaction is associated and using it to obtain the file information and contents.

After the file information has been acquired, the size or contents MUST be sent to the Remote Desktop Protocol: Clipboard Virtual Channel Extension endpoint by using the File Contents Response PDU, and sent as specified in section 3.1.5.4.7. If the request cannot be satisfied, a File Contents Response PDU that contains the CB_RESPONSE_FAIL (0x0002) flag MUST be sent; otherwise, the CB_RESPONSE_OK (0x0001) flag MUST be specified.