Ejemplo n.º 1
0
        public bool Commit()
        {
            RegistryKey ndis_reg = Registry.LocalMachine.OpenSubKey("SYSTEM\\ControlSet001\\Control\\Class\\{4d36e972-e325-11ce-bfc1-08002be10318}" + "\\" + _ndis_key, true);

            FlowControl.checkAndCommit(ndis_reg, "*FlowControl");
            InterruptModeration.checkAndCommit(ndis_reg, "*InterruptModeration");
            RxBuffers.checkAndCommit(ndis_reg, "*ReceiveBuffers");
            TxBuffers.checkAndCommit(ndis_reg, "*TransmitBuffers");
            LargeSendOffload.checkAndCommit(ndis_reg, "*LsoV2IPv4");
            TcpChecksumOffload.checkAndCommit(ndis_reg, "*TCPChecksumOffloadIPv4");
            UdpChecksumOffload.checkAndCommit(ndis_reg, "*UDPChecksumOffloadIPv4");
            RSS.checkAndCommit(ndis_reg, "*RSS");
            HeaderDataSplit.checkAndCommit(ndis_reg, "*HeaderDataSplit");

            ndis_reg.Close();

            RegistryKey reg = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces" + "\\" + Id, true);

            TcpDelayedAckTicks.checkAndCommit(reg, "TcpDelAckTicks");
            Nagling.checkAndCommit(reg, "TCPNoDelay");
            TcpAckFrequency.checkAndCommit(reg, "TcpAckFrequency");

            // MTU behaves a little differently and is stored differently (for now anyway).
            if (MTU != int.Parse(reg.GetValue("MTU", "1500").ToString()))
            {
                reg.SetValue("MTU", MTU.ToString(), RegistryValueKind.DWord);
            }

            reg.Close();

            return(true);
        }
Ejemplo n.º 2
0
        public bool Commit()
        {
            RegistryKey hklm64 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
            RegistryKey reg    = hklm64.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile", true);

            // Update the network throttling value in the registry.
            netThrottling.checkAndCommit(reg, "NetworkThrottlingIndex");

            // Update the System reponsiveness (reserved resources for background programs) in the registry.
            backgroundReservedCpuPct.checkAndCommit(reg, "SystemResponsiveness");

            reg.Close();
            hklm64.Close();
            return(true);
        }