Fixed stackoverflow...

This commit is contained in:
Daniel Clark
2021-02-05 21:32:32 +00:00
parent b411f82243
commit 2be7a1128c
9 changed files with 61 additions and 49 deletions
@@ -0,0 +1,15 @@
using Microsoft.Win32;
namespace NotificationFlyout.Wpf.UI.Helpers
{
internal static class RegistryHelper
{
public static TValue GetDwordValue<TValue>(string key, string valueName)
{
using var baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64);
using var subKey = baseKey.OpenSubKey(key);
return (TValue)subKey.GetValue(valueName, 0);
}
}
}