The TS_GENERAL_CAPABILITYSET structure is used to advertise general characteristics and is based on the capability set specified in [T128] section 8.2.3. This capability is sent by both client and server.
file:///C:/ts_dev/TestSuites/MS-RDPBCGR/TestSuite/Src/TD/latest_XMLS_16may/RDPBCGR/ _rfc_ms-rdpbcgr2_1_6_1_1.xml
        /// <summary>
        /// Create a TS_GENERAL_CAPABILITYSET type Capability, 2.2.7.1.1   
        /// </summary>
        /// <param name="fpOutput">Advertiser supports fast-path output.</param>
        /// <param name="noBitmapCompHdr">Advertiser supports excluding the 8-byte Compressed Data Header (section 2.2.9.1.1.3.1.2.3) 
        /// from the Bitmap Data (section 2.2.9.1.1.3.1.2.2) structure 
        /// or the Cache Bitmap (Revision 2) Secondary Drawing Order ([MS-RDPEGDI] section 2.2.2.2.1.2.3).</param>
        /// <param name="longCreds">Advertiser supports long-length credentials for the user name, password, 
        /// or domain name in the Save Session Info PDU (section 2.2.10.1).</param>
        /// <param name="autoReconnect">Advertiser supports auto-reconnection (section 5.5).</param>
        /// <param name="mac">Advertiser supports salted MAC generation (see section 5.3.6.1.1).</param>
        /// <param name="refreshRect">Server supports Refresh Rect PDU or not</param>
        /// <param name="suppressOutput">Server supports Suppress Output PDU or not</param>
        /// <param name="osMajorType">The type of platform</param>
        /// <param name="osMinorType">The version of the platform specified in the osMajorType field</param>
        /// <returns>TS_GENERAL_CAPABILITYSET type Capability</returns>
        public static TS_GENERAL_CAPABILITYSET CreateGeneralCapSet(
            bool fpOutput,
            bool noBitmapCompHdr,
            bool longCreds,
            bool autoReconnect,
            bool mac,
            bool refreshRect,
            bool suppressOutput,
            osMajorType_Values osMajorType,
            osMinorType_Values osMinorType
            )
        {
            TS_GENERAL_CAPABILITYSET generalCapabilitySet = new TS_GENERAL_CAPABILITYSET();

            generalCapabilitySet.capabilitySetType = capabilitySetType_Values.CAPSTYPE_GENERAL;
            generalCapabilitySet.lengthCapability = (ushort)Marshal.SizeOf(generalCapabilitySet);
            generalCapabilitySet.osMajorType = osMajorType;
            generalCapabilitySet.osMinorType = osMinorType;
            generalCapabilitySet.protocolVersion = protocolVersion_Values.V1;
            generalCapabilitySet.pad2octetsA = 0;
            generalCapabilitySet.generalCompressionTypes = generalCompressionTypes_Values.V1;

            if (fpOutput)
                generalCapabilitySet.extraFlags |= extraFlags_Values.FASTPATH_OUTPUT_SUPPORTED;
            if (noBitmapCompHdr)
                generalCapabilitySet.extraFlags |= extraFlags_Values.NO_BITMAP_COMPRESSION_HDR;
            if (longCreds)
                generalCapabilitySet.extraFlags |= extraFlags_Values.LONG_CREDENTIALS_SUPPORTED;
            if (autoReconnect)
                generalCapabilitySet.extraFlags |= extraFlags_Values.AUTORECONNECT_SUPPORTED;
            if (mac)
                generalCapabilitySet.extraFlags |= extraFlags_Values.ENC_SALTED_CHECKSUM;

            generalCapabilitySet.updateCapabilityFlag = updateCapabilityFlag_Values.V1;
            generalCapabilitySet.remoteUnshareFlag = remoteUnshareFlag_Values.V1;
            generalCapabilitySet.generalCompressionLevel = generalCompressionLevel_Values.V1;

            generalCapabilitySet.refreshRectSupport = refreshRect ? refreshRectSupport_Values.TRUE : refreshRectSupport_Values.FALSE;
            generalCapabilitySet.suppressOutputSupport = suppressOutput ? suppressOutputSupport_Values.TRUE : suppressOutputSupport_Values.FALSE;

            generalCapabilitySet.lengthCapability = (ushort)Marshal.SizeOf(generalCapabilitySet);

            return generalCapabilitySet;
        }
        /// <summary>
        /// 2.2.7.1.1
        /// </summary>
        /// <param name="general"></param>
        public void VerifyStructure(TS_GENERAL_CAPABILITYSET general)
        {
            site.CaptureRequirementIfAreEqual<capabilitySetType_Values>(capabilitySetType_Values.CAPSTYPE_GENERAL, general.capabilitySetType, 1043,
                @"In TS_GENERAL_CAPABILITYSET structure, the capabilitySetType field MUST be set to CAPSTYPE_GENERAL (1).");

            CaptureRequirement(general.osMajorType == osMajorType_Values.OSMAJORTYPE_MACINTOSH ||
                general.osMajorType == osMajorType_Values.OSMAJORTYPE_OS2 ||
                general.osMajorType == osMajorType_Values.OSMAJORTYPE_UNIX ||
                general.osMajorType == osMajorType_Values.OSMAJORTYPE_WINDOWS ||
                general.osMajorType == osMajorType_Values.OSMAJORTYPE_IOS ||
                general.osMajorType == osMajorType_Values.OSMAJORTYPE_OSX ||
                general.osMajorType == osMajorType_Values.OSMAJORTYPE_ANDROID,
                1047);
            CaptureRequirement(general.osMinorType >= osMinorType_Values.OSMINORTYPE_WINDOWS_31X && general.osMinorType <= osMinorType_Values.OSMINORTYPE_WINDOWS_RT, 1054);
            CaptureRequirement(general.protocolVersion == protocolVersion_Values.V1,1065);
            CaptureRequirement(general.generalCompressionTypes == generalCompressionTypes_Values.V1,1069);
            CaptureRequirement(general.updateCapabilityFlag == updateCapabilityFlag_Values.V1,1080);
            CaptureRequirement(general.remoteUnshareFlag == remoteUnshareFlag_Values.V1, 1082);
        }