The TS_FONT_LIST_PDU structure contains information that is sent to the server for legacy reasons.
file:///C:/ts_dev/TestSuites/MS-RDPBCGR/TestSuite/Src/TD/latest_XMLS_16may/RDPBCGR/ _rfc_ms-rdpbcgr2_1_1_18_1.xml
        /// <summary>
        /// Parse TS_FONT_LIST_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_FONT_LIST_PDU</returns>
        private TS_FONT_LIST_PDU ParseTsFontListPdu(byte[] data, ref int currentIndex)
        {
            TS_FONT_LIST_PDU pdu = new TS_FONT_LIST_PDU();
            pdu.shareDataHeader = ParseTsShareDataHeader(data, ref currentIndex);
            pdu.numberFonts = ParseUInt16(data, ref currentIndex, false);
            pdu.totalNumFonts = ParseUInt16(data, ref currentIndex, false);
            pdu.listFlags = ParseUInt16(data, ref currentIndex, false);
            pdu.entrySize = ParseUInt16(data, ref currentIndex, false);

            return pdu;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Encode controlPduData field.
        /// </summary>
        /// <param name="fontListPduData">The data to be encoded.</param>
        /// <returns>The encoded data.</returns>
        private static byte[] EncodeFontListData(TS_FONT_LIST_PDU fontListPduData)
        {
            List<byte> dataBuffer = new List<byte>();

            if (fontListPduData != null)
            {
                RdpbcgrEncoder.EncodeStructure(dataBuffer, fontListPduData.shareDataHeader);
                RdpbcgrEncoder.EncodeStructure(dataBuffer, fontListPduData.numberFonts);
                RdpbcgrEncoder.EncodeStructure(dataBuffer, fontListPduData.totalNumFonts);
                RdpbcgrEncoder.EncodeStructure(dataBuffer, fontListPduData.listFlags);
                RdpbcgrEncoder.EncodeStructure(dataBuffer, fontListPduData.entrySize);
            }

            return dataBuffer.ToArray();
        }