コード例 #1
0
ファイル: gpedit.cs プロジェクト: dlin2028/CypatWindows
        /// <summary>
        /// thread start for EnumValues
        /// </summary>
        /// <param name="values">
        /// values[0] - isMachine<br/>
        /// values[1] - configFullPath<br/>
        /// </param>
        public static void EnumValues(object values)
        {
            object[] valueList      = (object[])values;
            bool     isMachine      = (bool)valueList[0];
            String   configFullPath = (String)valueList[1];

            WinAPIForGroupPolicy.GroupPolicyObjectHandler gpHandler = new WinAPIForGroupPolicy.GroupPolicyObjectHandler();
            _returnValueFromGet = gpHandler.EnumGroupPolicyValue(isMachine, configFullPath);
        }
コード例 #2
0
ファイル: gpedit.cs プロジェクト: dlin2028/CypatWindows
        /// <summary>
        /// Thread start for seting group policy.
        /// Called by public static ResultCode SetGroupPolicy(bool isMachine, WinRMGPConfigName configName, object value)
        /// </summary>
        /// <param name="values">
        /// values[0] - isMachine<br/>
        /// values[1] - configFullPath<br/>
        /// values[2] - configKey<br/>
        /// values[3] - value<br/>
        /// </param>
        private static void SetGroupPolicy(object values)
        {
            object[] valueList      = (object[])values;
            bool     isMachine      = (bool)valueList[0];
            String   configFullPath = (String)valueList[1];
            String   configKey      = (String)valueList[2];
            object   value          = valueList[3];

            WinAPIForGroupPolicy.GroupPolicyObjectHandler gpHandler = new WinAPIForGroupPolicy.GroupPolicyObjectHandler();
            _returnValueFromSet = gpHandler.SetGroupPolicy(isMachine, configFullPath, configKey, value);
        }