internal static bool SetArmaOAKey(byte[] hexkey) { try { RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(Arma.strArmaOARegLocation[Arma.GetArch()], true); if (registryKey == null) { return(false); } registryKey.SetValue("KEY", (object)hexkey); registryKey.Close(); return(true); } catch { return(false); } }
internal static string GetArmaOAPath() { try { RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(Arma.strArmaOARegLocation[Arma.GetArch()]); if (registryKey != null) { return(registryKey.GetValue("MAIN").ToString()); } else { return(null); } } catch { return(null); } }
internal static byte[] GetArmaOAKey() { try { RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(Arma.strArmaOARegLocation[Arma.GetArch()]); if (registryKey != null) { return((byte[])registryKey.GetValue("KEY")); } else { return((byte[])null); } } catch { return((byte[])null); } }