364 lines
17 KiB
C#
364 lines
17 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using Microsoft.Win32.SafeHandles;
|
|
|
|
namespace Microsoft.Win32
|
|
{
|
|
/// <summary>Represents a key-level node in the Windows registry. This class is a registry encapsulation.</summary>
|
|
// Token: 0x02000066 RID: 102
|
|
[Token(Token = "0x2000066")]
|
|
[ComVisible(true)]
|
|
public sealed class RegistryKey : MarshalByRefObject, IDisposable
|
|
{
|
|
// Token: 0x06000295 RID: 661 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000295")]
|
|
[Address(RVA = "0x2AB4860", Offset = "0x2AB3660", VA = "0x182AB4860")]
|
|
internal RegistryKey(RegistryHive hiveId)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000296 RID: 662 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000296")]
|
|
[Address(RVA = "0x2AB46A0", Offset = "0x2AB34A0", VA = "0x182AB46A0")]
|
|
internal RegistryKey(RegistryHive hiveId, IntPtr keyHandle, bool remoteRoot)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000297 RID: 663 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000297")]
|
|
[Address(RVA = "0x2AB4650", Offset = "0x2AB3450", VA = "0x182AB4650")]
|
|
internal RegistryKey(object data, string keyName, bool writable)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000298 RID: 664 RVA: 0x000031C8 File Offset: 0x000013C8
|
|
[Token(Token = "0x6000298")]
|
|
[Address(RVA = "0x2AB3E30", Offset = "0x2AB2C30", VA = "0x182AB3E30")]
|
|
internal static bool IsEquals(RegistryKey a, RegistryKey b)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Releases all resources used by the current instance of the <see cref="T:Microsoft.Win32.RegistryKey" /> class.</summary>
|
|
// Token: 0x06000299 RID: 665 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000299")]
|
|
[Address(RVA = "0x2AB36F0", Offset = "0x2AB24F0", VA = "0x182AB36F0", Slot = "6")]
|
|
public void Dispose()
|
|
{
|
|
}
|
|
|
|
/// <summary>Retrieves the name of the key.</summary>
|
|
/// <returns>The absolute (qualified) name of the key.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:Microsoft.Win32.RegistryKey" /> is closed (closed keys cannot be accessed).</exception>
|
|
// Token: 0x1700005E RID: 94
|
|
// (get) Token: 0x0600029A RID: 666 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x1700005E")]
|
|
public string Name
|
|
{
|
|
[Token(Token = "0x600029A")]
|
|
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Writes all the attributes of the specified open registry key into the registry.</summary>
|
|
// Token: 0x0600029B RID: 667 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600029B")]
|
|
[Address(RVA = "0x2AB3830", Offset = "0x2AB2630", VA = "0x182AB3830")]
|
|
public void Flush()
|
|
{
|
|
}
|
|
|
|
/// <summary>Closes the key and flushes it to disk if its contents have been modified.</summary>
|
|
// Token: 0x0600029C RID: 668 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600029C")]
|
|
[Address(RVA = "0x2AB32B0", Offset = "0x2AB20B0", VA = "0x182AB32B0")]
|
|
public void Close()
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets a <see cref="T:Microsoft.Win32.SafeHandles.SafeRegistryHandle" /> object that represents the registry key that the current <see cref="T:Microsoft.Win32.RegistryKey" /> object encapsulates.</summary>
|
|
/// <returns>The handle to the registry key.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The registry key is closed. Closed keys cannot be accessed.</exception>
|
|
/// <exception cref="T:System.UnauthorizedAccessException">The user does not have the necessary registry rights.</exception>
|
|
/// <exception cref="T:System.IO.IOException">A system error occurred, such as deletion of the current key.</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have the permissions required to read the key.</exception>
|
|
// Token: 0x1700005F RID: 95
|
|
// (get) Token: 0x0600029D RID: 669 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x1700005F")]
|
|
[MonoTODO]
|
|
[MonoTODO("Not implemented in Unix")]
|
|
[ComVisible(false)]
|
|
public SafeRegistryHandle Handle
|
|
{
|
|
[Token(Token = "0x600029D")]
|
|
[Address(RVA = "0x2AB4A30", Offset = "0x2AB3830", VA = "0x182AB4A30")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Sets the specified name/value pair.</summary>
|
|
/// <param name="name">The name of the value to store.</param>
|
|
/// <param name="value">The data to be stored.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="value" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="value" /> is an unsupported data type.</exception>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:Microsoft.Win32.RegistryKey" /> that contains the specified value is closed (closed keys cannot be accessed).</exception>
|
|
/// <exception cref="T:System.UnauthorizedAccessException">The <see cref="T:Microsoft.Win32.RegistryKey" /> is read-only, and cannot be written to; for example, the key has not been opened with write access.
|
|
/// -or-
|
|
/// The <see cref="T:Microsoft.Win32.RegistryKey" /> object represents a root-level node, and the operating system is Windows Millennium Edition or Windows 98.</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have the permissions required to create or modify registry keys.</exception>
|
|
/// <exception cref="T:System.IO.IOException">The <see cref="T:Microsoft.Win32.RegistryKey" /> object represents a root-level node, and the operating system is Windows 2000, Windows XP, or Windows Server 2003.</exception>
|
|
// Token: 0x0600029E RID: 670 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x600029E")]
|
|
[Address(RVA = "0x2AB4200", Offset = "0x2AB3000", VA = "0x182AB4200")]
|
|
public void SetValue(string name, object value)
|
|
{
|
|
}
|
|
|
|
/// <summary>Retrieves a subkey as read-only.</summary>
|
|
/// <param name="name">The name or path of the subkey to open as read-only.</param>
|
|
/// <returns>The subkey requested, or <see langword="null" /> if the operation failed.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="name" /> is <see langword="null" /></exception>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:Microsoft.Win32.RegistryKey" /> is closed (closed keys cannot be accessed).</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have the permissions required to read the registry key.</exception>
|
|
// Token: 0x0600029F RID: 671 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x600029F")]
|
|
[Address(RVA = "0x2AB3EB0", Offset = "0x2AB2CB0", VA = "0x182AB3EB0")]
|
|
public RegistryKey OpenSubKey(string name)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Retrieves a specified subkey, and specifies whether write access is to be applied to the key.</summary>
|
|
/// <param name="name">Name or path of the subkey to open.</param>
|
|
/// <param name="writable">Set to <see langword="true" /> if you need write access to the key.</param>
|
|
/// <returns>The subkey requested, or <see langword="null" /> if the operation failed.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="name" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:Microsoft.Win32.RegistryKey" /> is closed (closed keys cannot be accessed).</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have the permissions required to access the registry key in the specified mode.</exception>
|
|
// Token: 0x060002A0 RID: 672 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002A0")]
|
|
[Address(RVA = "0x2AB4050", Offset = "0x2AB2E50", VA = "0x182AB4050")]
|
|
public RegistryKey OpenSubKey(string name, bool writable)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Retrieves the value associated with the specified name. Returns <see langword="null" /> if the name/value pair does not exist in the registry.</summary>
|
|
/// <param name="name">The name of the value to retrieve. This string is not case-sensitive.</param>
|
|
/// <returns>The value associated with <paramref name="name" />, or <see langword="null" /> if <paramref name="name" /> is not found.</returns>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have the permissions required to read from the registry key.</exception>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:Microsoft.Win32.RegistryKey" /> that contains the specified value is closed (closed keys cannot be accessed).</exception>
|
|
/// <exception cref="T:System.IO.IOException">The <see cref="T:Microsoft.Win32.RegistryKey" /> that contains the specified value has been marked for deletion.</exception>
|
|
/// <exception cref="T:System.UnauthorizedAccessException">The user does not have the necessary registry rights.</exception>
|
|
// Token: 0x060002A1 RID: 673 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002A1")]
|
|
[Address(RVA = "0x2AB3CC0", Offset = "0x2AB2AC0", VA = "0x182AB3CC0")]
|
|
public object GetValue(string name)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Retrieves the value associated with the specified name. If the name is not found, returns the default value that you provide.</summary>
|
|
/// <param name="name">The name of the value to retrieve. This string is not case-sensitive.</param>
|
|
/// <param name="defaultValue">The value to return if <paramref name="name" /> does not exist.</param>
|
|
/// <returns>The value associated with <paramref name="name" />, with any embedded environment variables left unexpanded, or <paramref name="defaultValue" /> if <paramref name="name" /> is not found.</returns>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have the permissions required to read from the registry key.</exception>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:Microsoft.Win32.RegistryKey" /> that contains the specified value is closed (closed keys cannot be accessed).</exception>
|
|
/// <exception cref="T:System.IO.IOException">The <see cref="T:Microsoft.Win32.RegistryKey" /> that contains the specified value has been marked for deletion.</exception>
|
|
/// <exception cref="T:System.UnauthorizedAccessException">The user does not have the necessary registry rights.</exception>
|
|
// Token: 0x060002A2 RID: 674 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002A2")]
|
|
[Address(RVA = "0x2AB3B40", Offset = "0x2AB2940", VA = "0x182AB3B40")]
|
|
public object GetValue(string name, object defaultValue)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Creates a new subkey or opens an existing subkey for write access.</summary>
|
|
/// <param name="subkey">The name or path of the subkey to create or open. This string is not case-sensitive.</param>
|
|
/// <returns>The newly created subkey, or <see langword="null" /> if the operation failed. If a zero-length string is specified for <paramref name="subkey" />, the current <see cref="T:Microsoft.Win32.RegistryKey" /> object is returned.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="subkey" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have the permissions required to create or open the registry key.</exception>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:Microsoft.Win32.RegistryKey" /> on which this method is being invoked is closed (closed keys cannot be accessed).</exception>
|
|
/// <exception cref="T:System.UnauthorizedAccessException">The <see cref="T:Microsoft.Win32.RegistryKey" /> cannot be written to; for example, it was not opened as a writable key , or the user does not have the necessary access rights.</exception>
|
|
/// <exception cref="T:System.IO.IOException">The nesting level exceeds 510.
|
|
/// -or-
|
|
/// A system error occurred, such as deletion of the key, or an attempt to create a key in the <see cref="F:Microsoft.Win32.Registry.LocalMachine" /> root.</exception>
|
|
// Token: 0x060002A3 RID: 675 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002A3")]
|
|
[Address(RVA = "0x2AB3410", Offset = "0x2AB2210", VA = "0x182AB3410")]
|
|
public RegistryKey CreateSubKey(string subkey)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Retrieves an array of strings that contains all the subkey names.</summary>
|
|
/// <returns>An array of strings that contains the names of the subkeys for the current key.</returns>
|
|
/// <exception cref="T:System.Security.SecurityException">The user does not have the permissions required to read from the key.</exception>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:Microsoft.Win32.RegistryKey" /> being manipulated is closed (closed keys cannot be accessed).</exception>
|
|
/// <exception cref="T:System.UnauthorizedAccessException">The user does not have the necessary registry rights.</exception>
|
|
/// <exception cref="T:System.IO.IOException">A system error occurred, for example the current key has been deleted.</exception>
|
|
// Token: 0x060002A4 RID: 676 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002A4")]
|
|
[Address(RVA = "0x2AB3A00", Offset = "0x2AB2800", VA = "0x182AB3A00")]
|
|
public string[] GetSubKeyNames()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Retrieves a string representation of this key.</summary>
|
|
/// <returns>A string representing the key. If the specified key is invalid (cannot be found) then <see langword="null" /> is returned.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:Microsoft.Win32.RegistryKey" /> being accessed is closed (closed keys cannot be accessed).</exception>
|
|
// Token: 0x060002A5 RID: 677 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002A5")]
|
|
[Address(RVA = "0x2AB43F0", Offset = "0x2AB31F0", VA = "0x182AB43F0", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x17000060 RID: 96
|
|
// (get) Token: 0x060002A6 RID: 678 RVA: 0x000031E0 File Offset: 0x000013E0
|
|
[Token(Token = "0x17000060")]
|
|
internal bool IsRoot
|
|
{
|
|
[Token(Token = "0x60002A6")]
|
|
[Address(RVA = "0x58C2E0", Offset = "0x58B0E0", VA = "0x18058C2E0")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000061 RID: 97
|
|
// (get) Token: 0x060002A7 RID: 679 RVA: 0x000031F8 File Offset: 0x000013F8
|
|
[Token(Token = "0x17000061")]
|
|
private bool IsWritable
|
|
{
|
|
[Token(Token = "0x60002A7")]
|
|
[Address(RVA = "0x43AAA0", Offset = "0x4398A0", VA = "0x18043AAA0")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000062 RID: 98
|
|
// (get) Token: 0x060002A8 RID: 680 RVA: 0x00003210 File Offset: 0x00001410
|
|
[Token(Token = "0x17000062")]
|
|
internal RegistryHive Hive
|
|
{
|
|
[Token(Token = "0x60002A8")]
|
|
[Address(RVA = "0x2AB4BD0", Offset = "0x2AB39D0", VA = "0x182AB4BD0")]
|
|
get
|
|
{
|
|
return (RegistryHive)0;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000063 RID: 99
|
|
// (get) Token: 0x060002A9 RID: 681 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x17000063")]
|
|
internal object InternalHandle
|
|
{
|
|
[Token(Token = "0x60002A9")]
|
|
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060002AA RID: 682 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60002AA")]
|
|
[Address(RVA = "0x2AB3240", Offset = "0x2AB2040", VA = "0x182AB3240")]
|
|
private void AssertKeyStillValid()
|
|
{
|
|
}
|
|
|
|
// Token: 0x060002AB RID: 683 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60002AB")]
|
|
[Address(RVA = "0x2AB31E0", Offset = "0x2AB1FE0", VA = "0x182AB31E0")]
|
|
private void AssertKeyNameNotNull(string subKeyName)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060002AC RID: 684 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60002AC")]
|
|
[Address(RVA = "0x2AB3170", Offset = "0x2AB1F70", VA = "0x182AB3170")]
|
|
private void AssertKeyNameLength(string name)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060002AD RID: 685 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002AD")]
|
|
[Address(RVA = "0x2AB3650", Offset = "0x2AB2450", VA = "0x182AB3650")]
|
|
internal static string DecodeString(byte[] data)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060002AE RID: 686 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002AE")]
|
|
[Address(RVA = "0x2AB33B0", Offset = "0x2AB21B0", VA = "0x182AB33B0")]
|
|
internal static IOException CreateMarkedForDeletionException()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060002AF RID: 687 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002AF")]
|
|
[Address(RVA = "0x2AB38B0", Offset = "0x2AB26B0", VA = "0x182AB38B0")]
|
|
private static string GetHiveName(RegistryHive hive)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x04000190 RID: 400
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4000190")]
|
|
private object handle;
|
|
|
|
// Token: 0x04000191 RID: 401
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4000191")]
|
|
private SafeRegistryHandle safe_handle;
|
|
|
|
// Token: 0x04000192 RID: 402
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4000192")]
|
|
private object hive;
|
|
|
|
// Token: 0x04000193 RID: 403
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4000193")]
|
|
private readonly string qname;
|
|
|
|
// Token: 0x04000194 RID: 404
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4000194")]
|
|
private readonly bool isRemoteRoot;
|
|
|
|
// Token: 0x04000195 RID: 405
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x39")]
|
|
[Token(Token = "0x4000195")]
|
|
private readonly bool isWritable;
|
|
|
|
// Token: 0x04000196 RID: 406
|
|
[Token(Token = "0x4000196")]
|
|
private static readonly IRegistryApi RegistryApi;
|
|
}
|
|
}
|