The TS_FP_CACHEDPOINTERATTRIBUTE structure is the fast-path variant of the TS_CACHEDPOINTERATTRIBUTE structure.
file:///C:/ts_dev/TestSuites/MS-RDPBCGR/TestSuite/Src/TD/latest_XMLS_16may/RDPBCGR/ _rfc_ms-rdpbcgr2_1_8_1_2_1_9.xml
Inheritance: TS_FP_UPDATE
        public static TS_FP_CACHEDPOINTERATTRIBUTE CreateCachedPointerAttribute(ushort cacheIndex)
        {
            TS_FP_CACHEDPOINTERATTRIBUTE cachePtr = new TS_FP_CACHEDPOINTERATTRIBUTE();

            cachePtr.updateHeader = (byte)(((int)updateCode_Values.FASTPATH_UPDATETYPE_CACHED & 0x0f)
                | (((int)fragmentation_Value.FASTPATH_FRAGMENT_SINGLE) << 4)
                | ((int)compressedType_Values.None << 6));

            cachePtr.size = 2;
            cachePtr.cachedPointerUpdateData.cacheIndex = cacheIndex;

            return cachePtr;
        }
        /// <summary>
        /// Parse TS_FP_CACHEDPOINTERATTRIBUTE
        /// </summary>
        /// <param name="updateHeader">update header</param>
        /// <param name="compressionFlags">compression flags</param>
        /// <param name="size">update data size(before decompression)</param>
        /// <param name="updateData">update data(decompressed)</param>
        /// <returns>TS_FP_CACHEDPOINTERATTRIBUTE</returns>
        private TS_FP_CACHEDPOINTERATTRIBUTE ParseTsFpCachedPointerAttribute(
            byte updateHeader,
            compressedType_Values compressionFlags,
            UInt16 size,
            byte[] updateData)
        {
            TS_FP_CACHEDPOINTERATTRIBUTE attribute = new TS_FP_CACHEDPOINTERATTRIBUTE();

            // TS_FP_CACHEDPOINTERATTRIBUTE: updateHeader
            attribute.updateHeader = updateHeader;

            // TS_FP_CACHEDPOINTERATTRIBUTE: compressionFlags
            attribute.compressionFlags = compressionFlags;

            // TS_FP_CACHEDPOINTERATTRIBUTE: size
            attribute.size = size;

            // TS_FP_CACHEDPOINTERATTRIBUTE: cachedPointerUpdateData
            int index = 0;
            attribute.cachedPointerUpdateData = ParseTsCachePointerAttribute(updateData, ref index);

            // Check if data length exceeded expectation
            VerifyDataLength(updateData.Length, index, ConstValue.ERROR_MESSAGE_DATA_LENGTH_EXCEEDED);
            return attribute;
        }
        private byte[] EncodeCachedPtr(TS_FP_CACHEDPOINTERATTRIBUTE ptrData)
        {
            List<byte> totalBuffer = new List<byte>();
            List<byte> buffer = new List<byte>();

            RdpbcgrEncoder.EncodeStructure(buffer, ptrData.cachedPointerUpdateData.cacheIndex);

            if (ptrData.compressionFlags != compressedType_Values.None)
            {
                RdpbcgrEncoder.EncodeBytes(
                    totalBuffer, serverSessionContext.Compress(ptrData.compressionFlags, buffer.ToArray()));
            }
            else
            {
                RdpbcgrEncoder.EncodeBytes(totalBuffer, buffer.ToArray());
            }
            return totalBuffer.ToArray();
        }