public static bool OpenKey(HKey key, string subKey, out HKey result) { return(AdvApi32.RegOpenKeyExW(key, subKey, 0, AdvApi32.RegistryKeyAccess.Read, out result) == 0); }