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 = "0xDB8120", Offset = "0xDB7120", VA = "0x180DB8120")]
|
|
internal RegistryKey(RegistryHive hiveId)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000296 RID: 662 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000296")]
|
|
[Address(RVA = "0xDB7F60", Offset = "0xDB6F60", VA = "0x180DB7F60")]
|
|
internal RegistryKey(RegistryHive hiveId, IntPtr keyHandle, bool remoteRoot)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000297 RID: 663 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000297")]
|
|
[Address(RVA = "0xDB7F10", Offset = "0xDB6F10", VA = "0x180DB7F10")]
|
|
internal RegistryKey(object data, string keyName, bool writable)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000298 RID: 664 RVA: 0x000031C8 File Offset: 0x000013C8
|
|
[Token(Token = "0x6000298")]
|
|
[Address(RVA = "0xDB76F0", Offset = "0xDB66F0", VA = "0x180DB76F0")]
|
|
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 = "0xDB6FB0", Offset = "0xDB5FB0", VA = "0x180DB6FB0", 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 = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
|
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 = "0xDB70F0", Offset = "0xDB60F0", VA = "0x180DB70F0")]
|
|
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 = "0xDB6B70", Offset = "0xDB5B70", VA = "0x180DB6B70")]
|
|
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 = "0xDB82F0", Offset = "0xDB72F0", VA = "0x180DB82F0")]
|
|
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 = "0xDB7AC0", Offset = "0xDB6AC0", VA = "0x180DB7AC0")]
|
|
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 = "0xDB7770", Offset = "0xDB6770", VA = "0x180DB7770")]
|
|
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 = "0xDB7910", Offset = "0xDB6910", VA = "0x180DB7910")]
|
|
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 = "0xDB7580", Offset = "0xDB6580", VA = "0x180DB7580")]
|
|
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 = "0xDB7400", Offset = "0xDB6400", VA = "0x180DB7400")]
|
|
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 = "0xDB6CD0", Offset = "0xDB5CD0", VA = "0x180DB6CD0")]
|
|
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 = "0xDB72C0", Offset = "0xDB62C0", VA = "0x180DB72C0")]
|
|
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 = "0xDB7CB0", Offset = "0xDB6CB0", VA = "0x180DB7CB0", 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 = "0xD18B80", Offset = "0xD17B80", VA = "0x180D18B80")]
|
|
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 = "0x51F230", Offset = "0x51E230", VA = "0x18051F230")]
|
|
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 = "0xDB8490", Offset = "0xDB7490", VA = "0x180DB8490")]
|
|
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 = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060002AA RID: 682 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60002AA")]
|
|
[Address(RVA = "0xDB6B00", Offset = "0xDB5B00", VA = "0x180DB6B00")]
|
|
private void AssertKeyStillValid()
|
|
{
|
|
}
|
|
|
|
// Token: 0x060002AB RID: 683 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60002AB")]
|
|
[Address(RVA = "0xDB6AA0", Offset = "0xDB5AA0", VA = "0x180DB6AA0")]
|
|
private void AssertKeyNameNotNull(string subKeyName)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060002AC RID: 684 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x60002AC")]
|
|
[Address(RVA = "0xDB6A30", Offset = "0xDB5A30", VA = "0x180DB6A30")]
|
|
private void AssertKeyNameLength(string name)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060002AD RID: 685 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002AD")]
|
|
[Address(RVA = "0xDB6F10", Offset = "0xDB5F10", VA = "0x180DB6F10")]
|
|
internal static string DecodeString(byte[] data)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060002AE RID: 686 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002AE")]
|
|
[Address(RVA = "0xDB6C70", Offset = "0xDB5C70", VA = "0x180DB6C70")]
|
|
internal static IOException CreateMarkedForDeletionException()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x060002AF RID: 687 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x60002AF")]
|
|
[Address(RVA = "0xDB7170", Offset = "0xDB6170", VA = "0x180DB7170")]
|
|
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;
|
|
}
|
|
}
|