The TS_SET_ERROR_INFO_PDU structure contains the contents of the Set Error Info PDU, which is a Share Data Header with an error value field.
file:///C:/ts_dev/TestSuites/MS-RDPBCGR/TestSuite/Src/TD/latest_XMLS_16may/RDPBCGR/ _rfc_ms-rdpbcgr2_1_5_1_1.xml
        /// <summary>
        /// Parse TS_SET_ERROR_INFO_PDU
        /// (parser index is updated according to parsed length)
        /// </summary>
        /// <param name="data">data to be parsed</param>
        /// <param name="currentIndex">current parser index</param>
        /// <returns>TS_SET_ERROR_INFO_PDU</returns>
        private TS_SET_ERROR_INFO_PDU ParseTsSetErrorInfoPdu(byte[] data, ref int currentIndex)
        {
            TS_SET_ERROR_INFO_PDU pdu = new TS_SET_ERROR_INFO_PDU();

            // TS_SET_ERROR_INFO_PDU: shareDataHeader
            pdu.shareDataHeader = ParseTsShareDataHeader(data, ref currentIndex);

            // TS_SET_ERROR_INFO_PDU: errorInfo
            pdu.errorInfo = (errorInfo_Values)ParseUInt32(data, ref currentIndex, false);

            return pdu;
        }
        private byte[] EncodeErrorInfoData(TS_SET_ERROR_INFO_PDU errorInfoPduData)
        {
            List<byte> dataBuffer = new List<byte>();

            RdpbcgrEncoder.EncodeStructure(dataBuffer, errorInfoPduData.shareDataHeader);
            RdpbcgrEncoder.EncodeStructure(dataBuffer, (uint)errorInfoPduData.errorInfo);

            return dataBuffer.ToArray();
        }