示例#1
0
        /// <summary>
        /// Create Bitmap Codec structure which contains a TS_RFX_CLNT_CAPS_CONTAINER structure
        /// </summary>
        /// <returns></returns>
        private TS_BITMAPCODEC CreateTS_BITMAPCODEC_Image_RemoteFX()
        {
            TS_RFX_ICAP rfxIcapRLGR1 = new TS_RFX_ICAP();

            rfxIcapRLGR1.version     = version_Value.CLW_VERSION_1_0;
            rfxIcapRLGR1.flags       = 0x02;
            rfxIcapRLGR1.entropyBits = entropyBits_Value.CLW_ENTROPY_RLGR1;

            TS_RFX_ICAP rfxIcapRLGR3 = new TS_RFX_ICAP();

            rfxIcapRLGR3.version     = version_Value.CLW_VERSION_1_0;
            rfxIcapRLGR3.flags       = 0x02;
            rfxIcapRLGR3.entropyBits = entropyBits_Value.CLW_ENTROPY_RLGR3;

            TS_RFX_CAPSET rfxCapSet = new TS_RFX_CAPSET();

            rfxCapSet.numIcaps  = 2;
            rfxCapSet.icapsData = new TS_RFX_ICAP[] { rfxIcapRLGR1, rfxIcapRLGR3 };

            TS_RFX_CAPS rfxCaps = new TS_RFX_CAPS();

            rfxCaps.capsetsData = new TS_RFX_CAPSET[] { rfxCapSet };

            TS_RFX_CLNT_CAPS_CONTAINER rfxClnCaps = new TS_RFX_CLNT_CAPS_CONTAINER();

            rfxClnCaps.captureFlags = 0x00000001;
            rfxClnCaps.capsData     = rfxCaps;


            TS_BITMAPCODEC bitmapCodec = new TS_BITMAPCODEC();

            bitmapCodec.codecGUID.codecGUID1  = 0x2744CCD4;
            bitmapCodec.codecGUID.codecGUID2  = 0x9D8A;
            bitmapCodec.codecGUID.codecGUID3  = 0x4E74;
            bitmapCodec.codecGUID.codecGUID4  = 0x80;
            bitmapCodec.codecGUID.codecGUID5  = 0x3C;
            bitmapCodec.codecGUID.codecGUID6  = 0x0E;
            bitmapCodec.codecGUID.codecGUID7  = 0xCB;
            bitmapCodec.codecGUID.codecGUID8  = 0xEE;
            bitmapCodec.codecGUID.codecGUID9  = 0xA1;
            bitmapCodec.codecGUID.codecGUID10 = 0x9C;
            bitmapCodec.codecGUID.codecGUID11 = 0x54;
            bitmapCodec.codecID               = 3;
            bitmapCodec.codecProperties       = rfxClnCaps.ToBytes();
            bitmapCodec.codecPropertiesLength = (ushort)bitmapCodec.codecProperties.Length;
            return(bitmapCodec);
        }
        /// <summary>
        /// Create Bitmap Codec structure which contains a TS_RFX_CLNT_CAPS_CONTAINER structure
        /// </summary>
        /// <returns></returns>
        private static TS_BITMAPCODEC CreateTS_BITMAPCODEC_RemoteFX()
        {
            TS_RFX_ICAP rfxIcapRLGR1 = new TS_RFX_ICAP();

            rfxIcapRLGR1.version     = version_Value.CLW_VERSION_1_0;
            rfxIcapRLGR1.flags       = 0x00;
            rfxIcapRLGR1.entropyBits = entropyBits_Value.CLW_ENTROPY_RLGR1;

            TS_RFX_ICAP rfxIcapRLGR3 = new TS_RFX_ICAP();

            rfxIcapRLGR3.version     = version_Value.CLW_VERSION_1_0;
            rfxIcapRLGR3.flags       = 0x00;
            rfxIcapRLGR3.entropyBits = entropyBits_Value.CLW_ENTROPY_RLGR3;

            TS_RFX_CAPSET rfxCapSet = new TS_RFX_CAPSET();

            rfxCapSet.numIcaps  = 2;
            rfxCapSet.icapsData = new TS_RFX_ICAP[] { rfxIcapRLGR1, rfxIcapRLGR3 };

            TS_RFX_CAPS rfxCaps = new TS_RFX_CAPS();

            rfxCaps.capsetsData = new TS_RFX_CAPSET[] { rfxCapSet };

            TS_RFX_CLNT_CAPS_CONTAINER rfxClnCaps = new TS_RFX_CLNT_CAPS_CONTAINER();

            rfxClnCaps.captureFlags = 0x00000001;
            rfxClnCaps.capsData     = rfxCaps;


            TS_BITMAPCODEC bitmapCodec = new TS_BITMAPCODEC();

            bitmapCodec.codecGUID.codecGUID1  = 0x76772F12;
            bitmapCodec.codecGUID.codecGUID2  = 0xBD72;
            bitmapCodec.codecGUID.codecGUID3  = 0x4463;
            bitmapCodec.codecGUID.codecGUID4  = 0xAF;
            bitmapCodec.codecGUID.codecGUID5  = 0xB3;
            bitmapCodec.codecGUID.codecGUID6  = 0xB7;
            bitmapCodec.codecGUID.codecGUID7  = 0x3C;
            bitmapCodec.codecGUID.codecGUID8  = 0x9C;
            bitmapCodec.codecGUID.codecGUID9  = 0x6F;
            bitmapCodec.codecGUID.codecGUID10 = 0x78;
            bitmapCodec.codecGUID.codecGUID11 = 0x86;
            bitmapCodec.codecID               = 2;
            bitmapCodec.codecProperties       = rfxClnCaps.ToBytes();
            bitmapCodec.codecPropertiesLength = (ushort)bitmapCodec.codecProperties.Length;
            return(bitmapCodec);
        }