RT

解决方案 »

  1.   

    Windows里有几个类库可以调查一下吧
      

  2.   

    google 就可以得到答案
      

  3.   

    baidu 也可以得到答案 
      

  4.   

    搞定
    //读取注册表信息
                    RegistryKey hklm = Registry.LocalMachine;//
                    RegistryKey r_1 = hklm.OpenSubKey("SYSTEM", true);
                    RegistryKey r_2 = r_1.OpenSubKey("CurrentControlSet", true);
                    RegistryKey r_3 = r_2.OpenSubKey("Control", true);
                    RegistryKey r_4 = r_3.OpenSubKey("Terminal Server", true);
                    string strISState = r_4.GetValue("fDenyTSConnections").ToString();
                    if (strISState != "0")
                    {
                        r_4.SetValue("fDenyTSConnections", "0", RegistryValueKind.DWord);
                    }