【问题标题】:Registry.LocalMachine.OpenSubKey failing intermittentlyRegistry.LocalMachine.OpenSubKey 间歇性失败
【发布时间】:2010-01-11 20:51:06
【问题描述】:

我有一些这样的代码(winforms app .NET 2.0) RegistryKey regKey=Registry.LocalMachine.OpenSubKey@"SOFTWARE\cPaperless\TTC\Settings", false);

当 UAC 打开时,此代码在 Win7 和 Vista 上每隔一段时间就会失败(失败是指密钥为空。)请注意,密钥肯定存在,我可以在注册表中看到它 此外,该产品的另一部分在 HKLM 中使用相同的密钥,但该代码是 C++ 并且每次都有效
LONG lRetVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\cPaperless\TTC\Settings", 0, KEY_READ, &hKeyTTC_LM);

这里可能出了什么问题。有没有人见过这种行为
TIA

【问题讨论】:

    标签: .net registry


    【解决方案1】:

    可能是Registry Virtualization 问题?

    【讨论】:

      猜你喜欢
      • 2019-04-18
      • 2011-10-21
      • 1970-01-01
      • 2017-04-19
      • 1970-01-01
      • 2023-04-02
      • 1970-01-01
      • 1970-01-01
      • 2019-08-22
      相关资源
      最近更新 更多