950 lines
54 KiB
C#
950 lines
54 KiB
C#
using System;
|
|
using System.Runtime.ConstrainedExecution;
|
|
using System.Security;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Runtime.InteropServices
|
|
{
|
|
/// <summary>Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks, and converting managed to unmanaged types, as well as other miscellaneous methods used when interacting with unmanaged code.</summary>
|
|
// Token: 0x02000588 RID: 1416
|
|
[Token(Token = "0x2000588")]
|
|
public static class Marshal
|
|
{
|
|
// Token: 0x06002AEB RID: 10987 RVA: 0x00016BD8 File Offset: 0x00014DD8
|
|
[Token(Token = "0x6002AEB")]
|
|
[Address(RVA = "0x237DD80", Offset = "0x237CB80", VA = "0x18237DD80")]
|
|
private static int AddRefInternal(IntPtr pUnk)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Increments the reference count on the specified interface.</summary>
|
|
/// <param name="pUnk">The interface reference count to increment.</param>
|
|
/// <returns>The new value of the reference count on the <paramref name="pUnk" /> parameter.</returns>
|
|
// Token: 0x06002AEC RID: 10988 RVA: 0x00016BF0 File Offset: 0x00014DF0
|
|
[Token(Token = "0x6002AEC")]
|
|
[Address(RVA = "0x237DD90", Offset = "0x237CB90", VA = "0x18237DD90")]
|
|
public static int AddRef(IntPtr pUnk)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Allocates a block of memory of specified size from the COM task memory allocator.</summary>
|
|
/// <param name="cb">The size of the block of memory to be allocated.</param>
|
|
/// <returns>An integer representing the address of the block of memory allocated. This memory must be released with <see cref="M:System.Runtime.InteropServices.Marshal.FreeCoTaskMem(System.IntPtr)" />.</returns>
|
|
/// <exception cref="T:System.OutOfMemoryException">There is insufficient memory to satisfy the request.</exception>
|
|
// Token: 0x06002AED RID: 10989 RVA: 0x00016C08 File Offset: 0x00014E08
|
|
[Token(Token = "0x6002AED")]
|
|
[Address(RVA = "0x237DE30", Offset = "0x237CC30", VA = "0x18237DE30")]
|
|
public static IntPtr AllocCoTaskMem(int cb)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Allocates memory from the unmanaged memory of the process by using the pointer to the specified number of bytes.</summary>
|
|
/// <param name="cb">The required number of bytes in memory.</param>
|
|
/// <returns>A pointer to the newly allocated memory. This memory must be released using the <see cref="M:System.Runtime.InteropServices.Marshal.FreeHGlobal(System.IntPtr)" /> method.</returns>
|
|
/// <exception cref="T:System.OutOfMemoryException">There is insufficient memory to satisfy the request.</exception>
|
|
// Token: 0x06002AEE RID: 10990 RVA: 0x00016C20 File Offset: 0x00014E20
|
|
[Token(Token = "0x6002AEE")]
|
|
[Address(RVA = "0x237DE40", Offset = "0x237CC40", VA = "0x18237DE40")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
|
public static IntPtr AllocHGlobal(IntPtr cb)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Allocates memory from the unmanaged memory of the process by using the specified number of bytes.</summary>
|
|
/// <param name="cb">The required number of bytes in memory.</param>
|
|
/// <returns>A pointer to the newly allocated memory. This memory must be released using the <see cref="M:System.Runtime.InteropServices.Marshal.FreeHGlobal(System.IntPtr)" /> method.</returns>
|
|
/// <exception cref="T:System.OutOfMemoryException">There is insufficient memory to satisfy the request.</exception>
|
|
// Token: 0x06002AEF RID: 10991 RVA: 0x00016C38 File Offset: 0x00014E38
|
|
[Token(Token = "0x6002AEF")]
|
|
[Address(RVA = "0x237DE50", Offset = "0x237CC50", VA = "0x18237DE50")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
|
public static IntPtr AllocHGlobal(int cb)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x06002AF0 RID: 10992 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF0")]
|
|
[Address(RVA = "0x23805D0", Offset = "0x237F3D0", VA = "0x1823805D0")]
|
|
internal static void copy_to_unmanaged(Array source, int startIndex, IntPtr destination, int length)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002AF1 RID: 10993 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF1")]
|
|
[Address(RVA = "0x23805C0", Offset = "0x237F3C0", VA = "0x1823805C0")]
|
|
internal static void copy_from_unmanaged(IntPtr source, int startIndex, Array destination, int length)
|
|
{
|
|
}
|
|
|
|
/// <summary>Copies data from a one-dimensional, managed 8-bit unsigned integer array to an unmanaged memory pointer.</summary>
|
|
/// <param name="source">The one-dimensional array to copy from.</param>
|
|
/// <param name="startIndex">The zero-based index in the source array where copying should start.</param>
|
|
/// <param name="destination">The memory pointer to copy to.</param>
|
|
/// <param name="length">The number of array elements to copy.</param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="startIndex" /> and <paramref name="length" /> are not valid.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="source" />, <paramref name="startIndex" />, <paramref name="destination" />, or <paramref name="length" /> is <see langword="null" />.</exception>
|
|
// Token: 0x06002AF2 RID: 10994 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF2")]
|
|
[Address(RVA = "0x237ECE0", Offset = "0x237DAE0", VA = "0x18237ECE0")]
|
|
public static void Copy(byte[] source, int startIndex, IntPtr destination, int length)
|
|
{
|
|
}
|
|
|
|
/// <summary>Copies data from a one-dimensional, managed <see cref="T:System.IntPtr" /> array to an unmanaged memory pointer.</summary>
|
|
/// <param name="source">The one-dimensional array to copy from.</param>
|
|
/// <param name="startIndex">The zero-based index in the source array where copying should start.</param>
|
|
/// <param name="destination">The memory pointer to copy to.</param>
|
|
/// <param name="length">The number of array elements to copy.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="source" />, <paramref name="destination" />, <paramref name="startIndex" />, or <paramref name="length" /> is <see langword="null" />.</exception>
|
|
// Token: 0x06002AF3 RID: 10995 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF3")]
|
|
[Address(RVA = "0x237EEE0", Offset = "0x237DCE0", VA = "0x18237EEE0")]
|
|
public static void Copy(IntPtr[] source, int startIndex, IntPtr destination, int length)
|
|
{
|
|
}
|
|
|
|
/// <summary>Copies data from an unmanaged memory pointer to a managed 8-bit unsigned integer array.</summary>
|
|
/// <param name="source">The memory pointer to copy from.</param>
|
|
/// <param name="destination">The array to copy to.</param>
|
|
/// <param name="startIndex">The zero-based index in the destination array where copying should start.</param>
|
|
/// <param name="length">The number of array elements to copy.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="source" />, <paramref name="destination" />, <paramref name="startIndex" />, or <paramref name="length" /> is <see langword="null" />.</exception>
|
|
// Token: 0x06002AF4 RID: 10996 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF4")]
|
|
[Address(RVA = "0x237EE60", Offset = "0x237DC60", VA = "0x18237EE60")]
|
|
public static void Copy(IntPtr source, byte[] destination, int startIndex, int length)
|
|
{
|
|
}
|
|
|
|
/// <summary>Copies data from an unmanaged memory pointer to a managed character array.</summary>
|
|
/// <param name="source">The memory pointer to copy from.</param>
|
|
/// <param name="destination">The array to copy to.</param>
|
|
/// <param name="startIndex">The zero-based index in the destination array where copying should start.</param>
|
|
/// <param name="length">The number of array elements to copy.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="source" />, <paramref name="destination" />, <paramref name="startIndex" />, or <paramref name="length" /> is <see langword="null" />.</exception>
|
|
// Token: 0x06002AF5 RID: 10997 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF5")]
|
|
[Address(RVA = "0x237EDE0", Offset = "0x237DBE0", VA = "0x18237EDE0")]
|
|
public static void Copy(IntPtr source, char[] destination, int startIndex, int length)
|
|
{
|
|
}
|
|
|
|
/// <summary>Copies data from an unmanaged memory pointer to a managed 16-bit signed integer array.</summary>
|
|
/// <param name="source">The memory pointer to copy from.</param>
|
|
/// <param name="destination">The array to copy to.</param>
|
|
/// <param name="startIndex">The zero-based index in the destination array where copying should start.</param>
|
|
/// <param name="length">The number of array elements to copy.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="source" />, <paramref name="destination" />, <paramref name="startIndex" />, or <paramref name="length" /> is <see langword="null" />.</exception>
|
|
// Token: 0x06002AF6 RID: 10998 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF6")]
|
|
[Address(RVA = "0x237EF60", Offset = "0x237DD60", VA = "0x18237EF60")]
|
|
public static void Copy(IntPtr source, short[] destination, int startIndex, int length)
|
|
{
|
|
}
|
|
|
|
/// <summary>Copies data from an unmanaged memory pointer to a managed single-precision floating-point number array.</summary>
|
|
/// <param name="source">The memory pointer to copy from.</param>
|
|
/// <param name="destination">The array to copy to.</param>
|
|
/// <param name="startIndex">The zero-based index in the destination array where copying should start.</param>
|
|
/// <param name="length">The number of array elements to copy.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="source" />, <paramref name="destination" />, <paramref name="startIndex" />, or <paramref name="length" /> is <see langword="null" />.</exception>
|
|
// Token: 0x06002AF7 RID: 10999 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF7")]
|
|
[Address(RVA = "0x237ED60", Offset = "0x237DB60", VA = "0x18237ED60")]
|
|
public static void Copy(IntPtr source, float[] destination, int startIndex, int length)
|
|
{
|
|
}
|
|
|
|
/// <summary>Frees all substructures that the specified unmanaged memory block points to.</summary>
|
|
/// <param name="ptr">A pointer to an unmanaged block of memory.</param>
|
|
/// <param name="structuretype">Type of a formatted class. This provides the layout information necessary to delete the buffer in the <paramref name="ptr" /> parameter.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="structureType" /> has an automatic layout. Use sequential or explicit instead.</exception>
|
|
// Token: 0x06002AF8 RID: 11000 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF8")]
|
|
[Address(RVA = "0x237EFE0", Offset = "0x237DDE0", VA = "0x18237EFE0")]
|
|
[ComVisible(true)]
|
|
public static void DestroyStructure(IntPtr ptr, Type structuretype)
|
|
{
|
|
}
|
|
|
|
/// <summary>Frees a <see langword="BSTR" /> using the COM SysFreeString function.</summary>
|
|
/// <param name="ptr">The address of the BSTR to be freed.</param>
|
|
// Token: 0x06002AF9 RID: 11001 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AF9")]
|
|
[Address(RVA = "0x237EFF0", Offset = "0x237DDF0", VA = "0x18237EFF0")]
|
|
public static void FreeBSTR(IntPtr ptr)
|
|
{
|
|
}
|
|
|
|
/// <summary>Frees a block of memory allocated by the unmanaged COM task memory allocator.</summary>
|
|
/// <param name="ptr">The address of the memory to be freed.</param>
|
|
// Token: 0x06002AFA RID: 11002 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AFA")]
|
|
[Address(RVA = "0x237F000", Offset = "0x237DE00", VA = "0x18237F000")]
|
|
public static void FreeCoTaskMem(IntPtr ptr)
|
|
{
|
|
}
|
|
|
|
/// <summary>Frees memory previously allocated from the unmanaged memory of the process.</summary>
|
|
/// <param name="hglobal">The handle returned by the original matching call to <see cref="M:System.Runtime.InteropServices.Marshal.AllocHGlobal(System.IntPtr)" />.</param>
|
|
// Token: 0x06002AFB RID: 11003 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AFB")]
|
|
[Address(RVA = "0x237F010", Offset = "0x237DE10", VA = "0x18237F010")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
public static void FreeHGlobal(IntPtr hglobal)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002AFC RID: 11004 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AFC")]
|
|
[Address(RVA = "0x237DEB0", Offset = "0x237CCB0", VA = "0x18237DEB0")]
|
|
private static void ClearBSTR(IntPtr ptr)
|
|
{
|
|
}
|
|
|
|
/// <summary>Frees a BSTR pointer that was allocated using the <see cref="M:System.Runtime.InteropServices.Marshal.SecureStringToBSTR(System.Security.SecureString)" /> method.</summary>
|
|
/// <param name="s">The address of the <see langword="BSTR" /> to free.</param>
|
|
// Token: 0x06002AFD RID: 11005 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AFD")]
|
|
[Address(RVA = "0x23802D0", Offset = "0x237F0D0", VA = "0x1823802D0")]
|
|
public static void ZeroFreeBSTR(IntPtr s)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002AFE RID: 11006 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AFE")]
|
|
[Address(RVA = "0x237DF90", Offset = "0x237CD90", VA = "0x18237DF90")]
|
|
private static void ClearUnicode(IntPtr ptr)
|
|
{
|
|
}
|
|
|
|
/// <summary>Frees an unmanaged string pointer that was allocated using the <see cref="M:System.Runtime.InteropServices.Marshal.SecureStringToGlobalAllocUnicode(System.Security.SecureString)" /> method.</summary>
|
|
/// <param name="s">The address of the unmanaged string to free.</param>
|
|
// Token: 0x06002AFF RID: 11007 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002AFF")]
|
|
[Address(RVA = "0x2380400", Offset = "0x237F200", VA = "0x182380400")]
|
|
public static void ZeroFreeGlobalAllocUnicode(IntPtr s)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002B00 RID: 11008 RVA: 0x00016C50 File Offset: 0x00014E50
|
|
[Token(Token = "0x6002B00")]
|
|
[Address(RVA = "0x237F020", Offset = "0x237DE20", VA = "0x18237F020")]
|
|
private static IntPtr GetCCW(object o, Type T)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x06002B01 RID: 11009 RVA: 0x00016C68 File Offset: 0x00014E68
|
|
[Token(Token = "0x6002B01")]
|
|
[Address(RVA = "0x237F030", Offset = "0x237DE30", VA = "0x18237F030")]
|
|
private static IntPtr GetComInterfaceForObjectInternal(object o, Type T)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Returns a pointer to an IUnknown interface that represents the specified interface on the specified object. Custom query interface access is enabled by default.</summary>
|
|
/// <param name="o">The object that provides the interface.</param>
|
|
/// <param name="T">The type of interface that is requested.</param>
|
|
/// <returns>The interface pointer that represents the specified interface for the object.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <typeparamref name="T" /> parameter is not an interface.
|
|
/// -or-
|
|
/// The type is not visible to COM.
|
|
/// -or-
|
|
/// The <typeparamref name="T" /> parameter is a generic type definition.</exception>
|
|
/// <exception cref="T:System.InvalidCastException">The <paramref name="o" /> parameter does not support the requested interface.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="o" /> parameter is <see langword="null" />.
|
|
/// -or-
|
|
/// The <typeparamref name="T" /> parameter is <see langword="null" />.</exception>
|
|
// Token: 0x06002B02 RID: 11010 RVA: 0x00016C80 File Offset: 0x00014E80
|
|
[Token(Token = "0x6002B02")]
|
|
[Address(RVA = "0x237F090", Offset = "0x237DE90", VA = "0x18237F090")]
|
|
public static IntPtr GetComInterfaceForObject(object o, Type T)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Converts the specified exception to an HRESULT.</summary>
|
|
/// <param name="e">The exception to convert to an HRESULT.</param>
|
|
/// <returns>The HRESULT mapped to the supplied exception.</returns>
|
|
// Token: 0x06002B03 RID: 11011 RVA: 0x00016C98 File Offset: 0x00014E98
|
|
[Token(Token = "0x6002B03")]
|
|
[Address(RVA = "0x237F500", Offset = "0x237E300", VA = "0x18237F500")]
|
|
public static int GetHRForException(Exception e)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Returns the error code returned by the last unmanaged function that was called using platform invoke that has the <see cref="F:System.Runtime.InteropServices.DllImportAttribute.SetLastError" /> flag set.</summary>
|
|
/// <returns>The last error code set by a call to the Win32 SetLastError function.</returns>
|
|
// Token: 0x06002B04 RID: 11012 RVA: 0x00016CB0 File Offset: 0x00014EB0
|
|
[Token(Token = "0x6002B04")]
|
|
[Address(RVA = "0x237F510", Offset = "0x237E310", VA = "0x18237F510")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
public static int GetLastWin32Error()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Performs a pre-link check for all methods on a class.</summary>
|
|
/// <param name="c">The class whose methods are to be checked.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="c" /> parameter is <see langword="null" />.</exception>
|
|
// Token: 0x06002B05 RID: 11013 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B05")]
|
|
[Address(RVA = "0x237F520", Offset = "0x237E320", VA = "0x18237F520")]
|
|
public static void PrelinkAll(Type c)
|
|
{
|
|
}
|
|
|
|
/// <summary>Copies all characters up to the first null character from an unmanaged ANSI string to a managed <see cref="T:System.String" />, and widens each ANSI character to Unicode.</summary>
|
|
/// <param name="ptr">The address of the first character of the unmanaged string.</param>
|
|
/// <returns>A managed string that holds a copy of the unmanaged ANSI string. If <paramref name="ptr" /> is <see langword="null" />, the method returns a null string.</returns>
|
|
// Token: 0x06002B06 RID: 11014 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B06")]
|
|
[Address(RVA = "0x237F540", Offset = "0x237E340", VA = "0x18237F540")]
|
|
public static string PtrToStringAnsi(IntPtr ptr)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Allocates a managed <see cref="T:System.String" />, copies a specified number of characters from an unmanaged ANSI string into it, and widens each ANSI character to Unicode.</summary>
|
|
/// <param name="ptr">The address of the first character of the unmanaged string.</param>
|
|
/// <param name="len">The byte count of the input string to copy.</param>
|
|
/// <returns>A managed string that holds a copy of the native ANSI string if the value of the <paramref name="ptr" /> parameter is not <see langword="null" />; otherwise, this method returns <see langword="null" />.</returns>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="len" /> is less than zero.</exception>
|
|
// Token: 0x06002B07 RID: 11015 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B07")]
|
|
[Address(RVA = "0x237F530", Offset = "0x237E330", VA = "0x18237F530")]
|
|
public static string PtrToStringAnsi(IntPtr ptr, int len)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Allocates a managed <see cref="T:System.String" /> and copies all characters up to the first null character from a string stored in unmanaged memory into it.</summary>
|
|
/// <param name="ptr">For Unicode platforms, the address of the first Unicode character.
|
|
/// -or-
|
|
/// For ANSI plaforms, the address of the first ANSI character.</param>
|
|
/// <returns>A managed string that holds a copy of the unmanaged string if the value of the <paramref name="ptr" /> parameter is not <see langword="null" />; otherwise, this method returns <see langword="null" />.</returns>
|
|
// Token: 0x06002B08 RID: 11016 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B08")]
|
|
[Address(RVA = "0x237F550", Offset = "0x237E350", VA = "0x18237F550")]
|
|
public static string PtrToStringAuto(IntPtr ptr)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Allocates a managed <see cref="T:System.String" /> and copies all characters up to the first null character from an unmanaged Unicode string into it.</summary>
|
|
/// <param name="ptr">The address of the first character of the unmanaged string.</param>
|
|
/// <returns>A managed string that holds a copy of the unmanaged string if the value of the <paramref name="ptr" /> parameter is not <see langword="null" />; otherwise, this method returns <see langword="null" />.</returns>
|
|
// Token: 0x06002B09 RID: 11017 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B09")]
|
|
[Address(RVA = "0x237F600", Offset = "0x237E400", VA = "0x18237F600")]
|
|
public static string PtrToStringUni(IntPtr ptr)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Allocates a managed <see cref="T:System.String" /> and copies a binary string (BSTR) stored in unmanaged memory into it.</summary>
|
|
/// <param name="ptr">The address of the first character of the unmanaged string.</param>
|
|
/// <returns>A managed string that holds a copy of the unmanaged string.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="ptr" /> equals <see cref="F:System.IntPtr.Zero" />.</exception>
|
|
// Token: 0x06002B0A RID: 11018 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B0A")]
|
|
[Address(RVA = "0x237F5F0", Offset = "0x237E3F0", VA = "0x18237F5F0")]
|
|
public static string PtrToStringBSTR(IntPtr ptr)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Marshals data from an unmanaged block of memory to a managed object.</summary>
|
|
/// <param name="ptr">A pointer to an unmanaged block of memory.</param>
|
|
/// <param name="structure">The object to which the data is to be copied. This must be an instance of a formatted class.</param>
|
|
/// <exception cref="T:System.ArgumentException">Structure layout is not sequential or explicit.
|
|
/// -or-
|
|
/// Structure is a boxed value type.</exception>
|
|
// Token: 0x06002B0B RID: 11019 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B0B")]
|
|
[Address(RVA = "0x237F610", Offset = "0x237E410", VA = "0x18237F610")]
|
|
[ComVisible(true)]
|
|
public static void PtrToStructure(IntPtr ptr, object structure)
|
|
{
|
|
}
|
|
|
|
/// <summary>Marshals data from an unmanaged block of memory to a newly allocated managed object of the specified type.</summary>
|
|
/// <param name="ptr">A pointer to an unmanaged block of memory.</param>
|
|
/// <param name="structureType">The type of object to be created. This object must represent a formatted class or a structure.</param>
|
|
/// <returns>A managed object containing the data pointed to by the <paramref name="ptr" /> parameter.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="structureType" /> parameter layout is not sequential or explicit.
|
|
/// -or-
|
|
/// The <paramref name="structureType" /> parameter is a generic type definition.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="structureType" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.MissingMethodException">The class specified by <paramref name="structureType" /> does not have an accessible default constructor.</exception>
|
|
// Token: 0x06002B0C RID: 11020 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B0C")]
|
|
[Address(RVA = "0x237F620", Offset = "0x237E420", VA = "0x18237F620")]
|
|
[ComVisible(true)]
|
|
public static object PtrToStructure(IntPtr ptr, Type structureType)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>[Supported in the .NET Framework 4.5.1 and later versions]
|
|
/// Marshals data from an unmanaged block of memory to a managed object of the specified type.</summary>
|
|
/// <param name="ptr">A pointer to an unmanaged block of memory.</param>
|
|
/// <param name="structure">The object to which the data is to be copied.</param>
|
|
/// <typeparam name="T">The type of <paramref name="structure" />. This must be a formatted class.</typeparam>
|
|
/// <exception cref="T:System.ArgumentException">Structure layout is not sequential or explicit.</exception>
|
|
// Token: 0x06002B0D RID: 11021 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B0D")]
|
|
[Address(RVA = "0x16D2C80", Offset = "0x16D1A80", VA = "0x1816D2C80")]
|
|
public static void PtrToStructure<T>(IntPtr ptr, T structure)
|
|
{
|
|
}
|
|
|
|
/// <summary>[Supported in the .NET Framework 4.5.1 and later versions]
|
|
/// Marshals data from an unmanaged block of memory to a newly allocated managed object of the type specified by a generic type parameter.</summary>
|
|
/// <param name="ptr">A pointer to an unmanaged block of memory.</param>
|
|
/// <typeparam name="T">The type of the object to which the data is to be copied. This must be a formatted class or a structure.</typeparam>
|
|
/// <returns>A managed object that contains the data that the <paramref name="ptr" /> parameter points to.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The layout of <typeparamref name="T" /> is not sequential or explicit.</exception>
|
|
/// <exception cref="T:System.MissingMethodException">The class specified by <typeparamref name="T" /> does not have an accessible default constructor.</exception>
|
|
// Token: 0x06002B0E RID: 11022 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B0E")]
|
|
[Address(RVA = "0x1299A10", Offset = "0x1298810", VA = "0x181299A10")]
|
|
public static T PtrToStructure<T>(IntPtr ptr)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Reads a single byte at a given offset (or index) from unmanaged memory.</summary>
|
|
/// <param name="ptr">The base address in unmanaged memory from which to read.</param>
|
|
/// <param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before reading.</param>
|
|
/// <returns>The byte read from unmanaged memory at the given offset.</returns>
|
|
/// <exception cref="T:System.AccessViolationException">Base address (<paramref name="ptr" />) plus offset byte (<paramref name="ofs" />) produces a null or invalid address.</exception>
|
|
// Token: 0x06002B0F RID: 11023 RVA: 0x00016CC8 File Offset: 0x00014EC8
|
|
[Token(Token = "0x6002B0F")]
|
|
[Address(RVA = "0x237F630", Offset = "0x237E430", VA = "0x18237F630")]
|
|
public static byte ReadByte(IntPtr ptr, int ofs)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Reads a 16-bit signed integer at a given offset from unmanaged memory.</summary>
|
|
/// <param name="ptr">The base address in unmanaged memory from which to read.</param>
|
|
/// <param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before reading.</param>
|
|
/// <returns>The 16-bit signed integer read from unmanaged memory at the given offset.</returns>
|
|
/// <exception cref="T:System.AccessViolationException">Base address (<paramref name="ptr" />) plus offset byte (<paramref name="ofs" />) produces a null or invalid address.</exception>
|
|
// Token: 0x06002B10 RID: 11024 RVA: 0x00016CE0 File Offset: 0x00014EE0
|
|
[Token(Token = "0x6002B10")]
|
|
[Address(RVA = "0x237F650", Offset = "0x237E450", VA = "0x18237F650")]
|
|
public static short ReadInt16(IntPtr ptr, int ofs)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Reads a 32-bit signed integer from unmanaged memory.</summary>
|
|
/// <param name="ptr">The address in unmanaged memory from which to read.</param>
|
|
/// <returns>The 32-bit signed integer read from unmanaged memory.</returns>
|
|
/// <exception cref="T:System.AccessViolationException">
|
|
/// <paramref name="ptr" /> is not a recognized format.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is invalid.</exception>
|
|
// Token: 0x06002B11 RID: 11025 RVA: 0x00016CF8 File Offset: 0x00014EF8
|
|
[Token(Token = "0x6002B11")]
|
|
[Address(RVA = "0x237F6A0", Offset = "0x237E4A0", VA = "0x18237F6A0")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
public static int ReadInt32(IntPtr ptr)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Reads a 32-bit signed integer at a given offset from unmanaged memory.</summary>
|
|
/// <param name="ptr">The base address in unmanaged memory from which to read.</param>
|
|
/// <param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before reading.</param>
|
|
/// <returns>The 32-bit signed integer read from unmanaged memory.</returns>
|
|
/// <exception cref="T:System.AccessViolationException">Base address (<paramref name="ptr" />) plus offset byte (<paramref name="ofs" />) produces a null or invalid address.</exception>
|
|
// Token: 0x06002B12 RID: 11026 RVA: 0x00016D10 File Offset: 0x00014F10
|
|
[Token(Token = "0x6002B12")]
|
|
[Address(RVA = "0x237F6E0", Offset = "0x237E4E0", VA = "0x18237F6E0")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
public static int ReadInt32(IntPtr ptr, int ofs)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Reads a 64-bit signed integer from unmanaged memory.</summary>
|
|
/// <param name="ptr">The address in unmanaged memory from which to read.</param>
|
|
/// <returns>The 64-bit signed integer read from unmanaged memory.</returns>
|
|
/// <exception cref="T:System.AccessViolationException">
|
|
/// <paramref name="ptr" /> is not a recognized format.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is invalid.</exception>
|
|
// Token: 0x06002B13 RID: 11027 RVA: 0x00016D28 File Offset: 0x00014F28
|
|
[Token(Token = "0x6002B13")]
|
|
[Address(RVA = "0x237F780", Offset = "0x237E580", VA = "0x18237F780")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
public static long ReadInt64(IntPtr ptr)
|
|
{
|
|
return 0L;
|
|
}
|
|
|
|
/// <summary>Reads a 64-bit signed integer at a given offset from unmanaged memory.</summary>
|
|
/// <param name="ptr">The base address in unmanaged memory from which to read.</param>
|
|
/// <param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before reading.</param>
|
|
/// <returns>The 64-bit signed integer read from unmanaged memory at the given offset.</returns>
|
|
/// <exception cref="T:System.AccessViolationException">Base address (<paramref name="ptr" />) plus offset byte (<paramref name="ofs" />) produces a null or invalid address.</exception>
|
|
// Token: 0x06002B14 RID: 11028 RVA: 0x00016D40 File Offset: 0x00014F40
|
|
[Token(Token = "0x6002B14")]
|
|
[Address(RVA = "0x237F730", Offset = "0x237E530", VA = "0x18237F730")]
|
|
public static long ReadInt64(IntPtr ptr, int ofs)
|
|
{
|
|
return 0L;
|
|
}
|
|
|
|
/// <summary>Reads a processor native-sized integer from unmanaged memory.</summary>
|
|
/// <param name="ptr">The address in unmanaged memory from which to read.</param>
|
|
/// <returns>The integer read from unmanaged memory. A 32 bit integer is returned on 32 bit machines and a 64 bit integer is returned on 64 bit machines.</returns>
|
|
/// <exception cref="T:System.AccessViolationException">
|
|
/// <paramref name="ptr" /> is not a recognized format.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is invalid.</exception>
|
|
// Token: 0x06002B15 RID: 11029 RVA: 0x00016D58 File Offset: 0x00014F58
|
|
[Token(Token = "0x6002B15")]
|
|
[Address(RVA = "0x237F8F0", Offset = "0x237E6F0", VA = "0x18237F8F0")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
public static IntPtr ReadIntPtr(IntPtr ptr)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Reads a processor native sized integer at a given offset from unmanaged memory.</summary>
|
|
/// <param name="ptr">The base address in unmanaged memory from which to read.</param>
|
|
/// <param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before reading.</param>
|
|
/// <returns>The integer read from unmanaged memory at the given offset.</returns>
|
|
/// <exception cref="T:System.AccessViolationException">Base address (<paramref name="ptr" />) plus offset byte (<paramref name="ofs" />) produces a null or invalid address.</exception>
|
|
// Token: 0x06002B16 RID: 11030 RVA: 0x00016D70 File Offset: 0x00014F70
|
|
[Token(Token = "0x6002B16")]
|
|
[Address(RVA = "0x237F7D0", Offset = "0x237E5D0", VA = "0x18237F7D0")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
public static IntPtr ReadIntPtr(IntPtr ptr, int ofs)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x06002B17 RID: 11031 RVA: 0x00016D88 File Offset: 0x00014F88
|
|
[Token(Token = "0x6002B17")]
|
|
[Address(RVA = "0x237FA00", Offset = "0x237E800", VA = "0x18237FA00")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
private static int ReleaseInternal(IntPtr pUnk)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Decrements the reference count on the specified interface.</summary>
|
|
/// <param name="pUnk">The interface to release.</param>
|
|
/// <returns>The new value of the reference count on the interface specified by the <paramref name="pUnk" /> parameter.</returns>
|
|
// Token: 0x06002B18 RID: 11032 RVA: 0x00016DA0 File Offset: 0x00014FA0
|
|
[Token(Token = "0x6002B18")]
|
|
[Address(RVA = "0x237FA10", Offset = "0x237E810", VA = "0x18237FA10")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
public static int Release(IntPtr pUnk)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Returns the unmanaged size of an object in bytes.</summary>
|
|
/// <param name="structure">The object whose size is to be returned.</param>
|
|
/// <returns>The size of the specified object in unmanaged code.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="structure" /> parameter is <see langword="null" />.</exception>
|
|
// Token: 0x06002B19 RID: 11033 RVA: 0x00016DB8 File Offset: 0x00014FB8
|
|
[Token(Token = "0x6002B19")]
|
|
[Address(RVA = "0x237FF20", Offset = "0x237ED20", VA = "0x18237FF20")]
|
|
[ComVisible(true)]
|
|
public static int SizeOf(object structure)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Returns the size of an unmanaged type in bytes.</summary>
|
|
/// <param name="t">The type whose size is to be returned.</param>
|
|
/// <returns>The size of the specified type in unmanaged code.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="t" /> parameter is a generic type definition.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="t" /> parameter is <see langword="null" />.</exception>
|
|
// Token: 0x06002B1A RID: 11034 RVA: 0x00016DD0 File Offset: 0x00014FD0
|
|
[Token(Token = "0x6002B1A")]
|
|
[Address(RVA = "0x237FF10", Offset = "0x237ED10", VA = "0x18237FF10")]
|
|
public static int SizeOf(Type t)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>[Supported in the .NET Framework 4.5.1 and later versions]
|
|
/// Returns the size of an unmanaged type in bytes.</summary>
|
|
/// <typeparam name="T">The type whose size is to be returned.</typeparam>
|
|
/// <returns>The size, in bytes, of the type that is specified by the <typeparamref name="T" /> generic type parameter.</returns>
|
|
// Token: 0x06002B1B RID: 11035 RVA: 0x00016DE8 File Offset: 0x00014FE8
|
|
[Token(Token = "0x6002B1B")]
|
|
[Address(RVA = "0x2174D70", Offset = "0x2173B70", VA = "0x182174D70")]
|
|
public static int SizeOf<T>()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>[Supported in the .NET Framework 4.5.1 and later versions]
|
|
/// Returns the unmanaged size of an object of a specified type in bytes.</summary>
|
|
/// <param name="structure">The object whose size is to be returned.</param>
|
|
/// <typeparam name="T">The type of the <paramref name="structure" /> parameter.</typeparam>
|
|
/// <returns>The size, in bytes, of the specified object in unmanaged code.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="structure" /> parameter is <see langword="null" />.</exception>
|
|
// Token: 0x06002B1C RID: 11036 RVA: 0x00016E00 File Offset: 0x00015000
|
|
[Token(Token = "0x6002B1C")]
|
|
[Address(RVA = "0x2174E00", Offset = "0x2173C00", VA = "0x182174E00")]
|
|
public static int SizeOf<T>(T structure)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Allocates a BSTR and copies the contents of a managed <see cref="T:System.String" /> into it.</summary>
|
|
/// <param name="s">The managed string to be copied.</param>
|
|
/// <returns>An unmanaged pointer to the <see langword="BSTR" />, or 0 if <paramref name="s" /> is null.</returns>
|
|
/// <exception cref="T:System.OutOfMemoryException">There is insufficient memory available.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The length for <paramref name="s" /> is out of range.</exception>
|
|
// Token: 0x06002B1D RID: 11037 RVA: 0x00016E18 File Offset: 0x00015018
|
|
[Token(Token = "0x6002B1D")]
|
|
[Address(RVA = "0x237FF90", Offset = "0x237ED90", VA = "0x18237FF90")]
|
|
public static IntPtr StringToBSTR(string s)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Copies the contents of a managed <see cref="T:System.String" /> into unmanaged memory.</summary>
|
|
/// <param name="s">A managed string to be copied.</param>
|
|
/// <returns>The address, in unmanaged memory, to where the <paramref name="s" /> was copied, or 0 if <paramref name="s" /> is <see langword="null" />.</returns>
|
|
/// <exception cref="T:System.OutOfMemoryException">The method could not allocate enough native heap memory.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="s" /> parameter exceeds the maximum length allowed by the operating system.</exception>
|
|
// Token: 0x06002B1E RID: 11038 RVA: 0x00016E30 File Offset: 0x00015030
|
|
[Token(Token = "0x6002B1E")]
|
|
[Address(RVA = "0x237FFA0", Offset = "0x237EDA0", VA = "0x18237FFA0")]
|
|
public static IntPtr StringToHGlobalUni(string s)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Allocates an unmanaged binary string (BSTR) and copies the contents of a managed <see cref="T:System.Security.SecureString" /> object into it.</summary>
|
|
/// <param name="s">The managed object to copy.</param>
|
|
/// <returns>The address, in unmanaged memory, where the <paramref name="s" /> parameter was copied to, or 0 if a null object was supplied.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="s" /> parameter is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.NotSupportedException">The current computer is not running Windows 2000 Service Pack 3 or later.</exception>
|
|
/// <exception cref="T:System.OutOfMemoryException">There is insufficient memory available.</exception>
|
|
// Token: 0x06002B1F RID: 11039 RVA: 0x00016E48 File Offset: 0x00015048
|
|
[Token(Token = "0x6002B1F")]
|
|
[Address(RVA = "0x237FAB0", Offset = "0x237E8B0", VA = "0x18237FAB0")]
|
|
public static IntPtr SecureStringToBSTR(SecureString s)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Copies the contents of a managed <see cref="T:System.Security.SecureString" /> object to a block of memory allocated from the unmanaged COM task allocator.</summary>
|
|
/// <param name="s">The managed object to copy.</param>
|
|
/// <returns>The address, in unmanaged memory, where the <paramref name="s" /> parameter was copied to, or 0 if a null object was supplied.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="s" /> parameter is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.NotSupportedException">The current computer is not running Windows 2000 Service Pack 3 or later.</exception>
|
|
/// <exception cref="T:System.OutOfMemoryException">There is insufficient memory available.</exception>
|
|
// Token: 0x06002B20 RID: 11040 RVA: 0x00016E60 File Offset: 0x00015060
|
|
[Token(Token = "0x6002B20")]
|
|
[Address(RVA = "0x237FC20", Offset = "0x237EA20", VA = "0x18237FC20")]
|
|
public static IntPtr SecureStringToCoTaskMemUnicode(SecureString s)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Copies the contents of a managed <see cref="T:System.Security.SecureString" /> object into unmanaged memory.</summary>
|
|
/// <param name="s">The managed object to copy.</param>
|
|
/// <returns>The address, in unmanaged memory, where <paramref name="s" /> was copied, or 0 if <paramref name="s" /> is a <see cref="T:System.Security.SecureString" /> object whose length is 0.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="s" /> parameter is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.NotSupportedException">The current computer is not running Windows 2000 Service Pack 3 or later.</exception>
|
|
/// <exception cref="T:System.OutOfMemoryException">There is insufficient memory available.</exception>
|
|
// Token: 0x06002B21 RID: 11041 RVA: 0x00016E78 File Offset: 0x00015078
|
|
[Token(Token = "0x6002B21")]
|
|
[Address(RVA = "0x237FE80", Offset = "0x237EC80", VA = "0x18237FE80")]
|
|
public static IntPtr SecureStringToGlobalAllocUnicode(SecureString s)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Marshals data from a managed object to an unmanaged block of memory.</summary>
|
|
/// <param name="structure">A managed object that holds the data to be marshaled. This object must be a structure or an instance of a formatted class.</param>
|
|
/// <param name="ptr">A pointer to an unmanaged block of memory, which must be allocated before this method is called.</param>
|
|
/// <param name="fDeleteOld">
|
|
/// <see langword="true" /> to call the <see cref="M:System.Runtime.InteropServices.Marshal.DestroyStructure(System.IntPtr,System.Type)" /> method on the <paramref name="ptr" /> parameter before this method copies the data. The block must contain valid data. Note that passing <see langword="false" /> when the memory block already contains data can lead to a memory leak.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="structure" /> is a reference type that is not a formatted class.
|
|
/// -or-
|
|
/// <paramref name="structure" /> is an instance of a generic type (in the .NET Framework 4.5 and earlier versions only).</exception>
|
|
// Token: 0x06002B22 RID: 11042 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B22")]
|
|
[Address(RVA = "0x237FFB0", Offset = "0x237EDB0", VA = "0x18237FFB0")]
|
|
[ComVisible(true)]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
|
public static void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld)
|
|
{
|
|
}
|
|
|
|
/// <summary>[Supported in the .NET Framework 4.5.1 and later versions]
|
|
/// Marshals data from a managed object of a specified type to an unmanaged block of memory.</summary>
|
|
/// <param name="structure">A managed object that holds the data to be marshaled. The object must be a structure or an instance of a formatted class.</param>
|
|
/// <param name="ptr">A pointer to an unmanaged block of memory, which must be allocated before this method is called.</param>
|
|
/// <param name="fDeleteOld">
|
|
/// <see langword="true" /> to call the <see cref="M:System.Runtime.InteropServices.Marshal.DestroyStructure``1(System.IntPtr)" /> method on the <paramref name="ptr" /> parameter before this method copies the data. The block must contain valid data. Note that passing <see langword="false" /> when the memory block already contains data can lead to a memory leak.</param>
|
|
/// <typeparam name="T">The type of the managed object.</typeparam>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="structure" /> is a reference type that is not a formatted class.</exception>
|
|
// Token: 0x06002B23 RID: 11043 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B23")]
|
|
[Address(RVA = "0x16D2CF0", Offset = "0x16D1AF0", VA = "0x1816D2CF0")]
|
|
public static void StructureToPtr<T>(T structure, IntPtr ptr, bool fDeleteOld)
|
|
{
|
|
}
|
|
|
|
/// <summary>Throws an exception with a specific failure HRESULT value.</summary>
|
|
/// <param name="errorCode">The HRESULT corresponding to the desired exception.</param>
|
|
// Token: 0x06002B24 RID: 11044 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B24")]
|
|
[Address(RVA = "0x237FFC0", Offset = "0x237EDC0", VA = "0x18237FFC0")]
|
|
public static void ThrowExceptionForHR(int errorCode)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002B25 RID: 11045 RVA: 0x00016E90 File Offset: 0x00015090
|
|
[Token(Token = "0x6002B25")]
|
|
[Address(RVA = "0x450D90", Offset = "0x44FB90", VA = "0x180450D90")]
|
|
private static IntPtr BufferToBSTR(Array ptr, int slen)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Gets the address of the element at the specified index inside the specified array.</summary>
|
|
/// <param name="arr">The array that contains the desired element.</param>
|
|
/// <param name="index">The index in the <paramref name="arr" /> parameter of the desired element.</param>
|
|
/// <returns>The address of <paramref name="index" /> inside <paramref name="arr" />.</returns>
|
|
// Token: 0x06002B26 RID: 11046 RVA: 0x00016EA8 File Offset: 0x000150A8
|
|
[Token(Token = "0x6002B26")]
|
|
[Address(RVA = "0x23800B0", Offset = "0x237EEB0", VA = "0x1823800B0")]
|
|
public static IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>[Supported in the .NET Framework 4.5.1 and later versions]
|
|
/// Gets the address of the element at the specified index in an array of a specified type.</summary>
|
|
/// <param name="arr">The array that contains the desired element.</param>
|
|
/// <param name="index">The index of the desired element in the <paramref name="arr" /> array.</param>
|
|
/// <typeparam name="T">The type of the array.</typeparam>
|
|
/// <returns>The address of <paramref name="index" /> in <paramref name="arr" />.</returns>
|
|
// Token: 0x06002B27 RID: 11047 RVA: 0x00016EC0 File Offset: 0x000150C0
|
|
[Token(Token = "0x6002B27")]
|
|
[Address(RVA = "0x21754C0", Offset = "0x21742C0", VA = "0x1821754C0")]
|
|
public static IntPtr UnsafeAddrOfPinnedArrayElement<T>(T[] arr, int index)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Writes a single byte value to unmanaged memory at a specified offset.</summary>
|
|
/// <param name="ptr">The base address in unmanaged memory to write to.</param>
|
|
/// <param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before writing.</param>
|
|
/// <param name="val">The value to write.</param>
|
|
/// <exception cref="T:System.AccessViolationException">Base address (<paramref name="ptr" />) plus offset byte (<paramref name="ofs" />) produces a null or invalid address.</exception>
|
|
// Token: 0x06002B28 RID: 11048 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B28")]
|
|
[Address(RVA = "0x23800C0", Offset = "0x237EEC0", VA = "0x1823800C0")]
|
|
public static void WriteByte(IntPtr ptr, int ofs, byte val)
|
|
{
|
|
}
|
|
|
|
/// <summary>Writes a 16-bit signed integer value into unmanaged memory at a specified offset.</summary>
|
|
/// <param name="ptr">The base address in unmanaged memory to write to.</param>
|
|
/// <param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before writing.</param>
|
|
/// <param name="val">The value to write.</param>
|
|
/// <exception cref="T:System.AccessViolationException">Base address (<paramref name="ptr" />) plus offset byte (<paramref name="ofs" />) produces a null or invalid address.</exception>
|
|
// Token: 0x06002B29 RID: 11049 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B29")]
|
|
[Address(RVA = "0x23800F0", Offset = "0x237EEF0", VA = "0x1823800F0")]
|
|
public static void WriteInt16(IntPtr ptr, int ofs, short val)
|
|
{
|
|
}
|
|
|
|
/// <summary>Writes a 32-bit signed integer value to unmanaged memory.</summary>
|
|
/// <param name="ptr">The address in unmanaged memory to write to.</param>
|
|
/// <param name="val">The value to write.</param>
|
|
/// <exception cref="T:System.AccessViolationException">
|
|
/// <paramref name="ptr" /> is not a recognized format.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is invalid.</exception>
|
|
// Token: 0x06002B2A RID: 11050 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B2A")]
|
|
[Address(RVA = "0x2380140", Offset = "0x237EF40", VA = "0x182380140")]
|
|
public static void WriteInt32(IntPtr ptr, int val)
|
|
{
|
|
}
|
|
|
|
/// <summary>Writes a 64-bit signed integer value to unmanaged memory.</summary>
|
|
/// <param name="ptr">The address in unmanaged memory to write to.</param>
|
|
/// <param name="val">The value to write.</param>
|
|
/// <exception cref="T:System.AccessViolationException">
|
|
/// <paramref name="ptr" /> is not a recognized format.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is invalid.</exception>
|
|
// Token: 0x06002B2B RID: 11051 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B2B")]
|
|
[Address(RVA = "0x2380180", Offset = "0x237EF80", VA = "0x182380180")]
|
|
public static void WriteInt64(IntPtr ptr, long val)
|
|
{
|
|
}
|
|
|
|
/// <summary>Writes a processor native sized integer value into unmanaged memory.</summary>
|
|
/// <param name="ptr">The address in unmanaged memory to write to.</param>
|
|
/// <param name="val">The value to write.</param>
|
|
/// <exception cref="T:System.AccessViolationException">
|
|
/// <paramref name="ptr" /> is not a recognized format.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is <see langword="null" />.
|
|
/// -or-
|
|
/// <paramref name="ptr" /> is invalid.</exception>
|
|
// Token: 0x06002B2C RID: 11052 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002B2C")]
|
|
[Address(RVA = "0x23801C0", Offset = "0x237EFC0", VA = "0x1823801C0")]
|
|
public static void WriteIntPtr(IntPtr ptr, IntPtr val)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06002B2D RID: 11053 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B2D")]
|
|
[Address(RVA = "0x237E0A0", Offset = "0x237CEA0", VA = "0x18237E0A0")]
|
|
private static Exception ConvertHrToException(int errorCode)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Converts the specified HRESULT error code to a corresponding <see cref="T:System.Exception" /> object.</summary>
|
|
/// <param name="errorCode">The HRESULT to be converted.</param>
|
|
/// <returns>An object that represents the converted HRESULT.</returns>
|
|
// Token: 0x06002B2E RID: 11054 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B2E")]
|
|
[Address(RVA = "0x237F460", Offset = "0x237E260", VA = "0x18237F460")]
|
|
public static Exception GetExceptionForHR(int errorCode)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Converts the specified HRESULT error code to a corresponding <see cref="T:System.Exception" /> object, with additional error information passed in an IErrorInfo interface for the exception object.</summary>
|
|
/// <param name="errorCode">The HRESULT to be converted.</param>
|
|
/// <param name="errorInfo">A pointer to the <see langword="IErrorInfo" /> interface that provides more information about the error. You can specify IntPtr(0) to use the current <see langword="IErrorInfo" /> interface, or IntPtr(-1) to ignore the current <see langword="IErrorInfo" /> interface and construct the exception just from the error code.</param>
|
|
/// <returns>An object that represents the converted HRESULT and information obtained from <paramref name="errorInfo" />.</returns>
|
|
// Token: 0x06002B2F RID: 11055 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B2F")]
|
|
[Address(RVA = "0x237F410", Offset = "0x237E210", VA = "0x18237F410")]
|
|
public static Exception GetExceptionForHR(int errorCode, IntPtr errorInfo)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06002B30 RID: 11056 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B30")]
|
|
[Address(RVA = "0x237F1C0", Offset = "0x237DFC0", VA = "0x18237F1C0")]
|
|
private static Delegate GetDelegateForFunctionPointerInternal(IntPtr ptr, Type t)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Converts an unmanaged function pointer to a delegate.</summary>
|
|
/// <param name="ptr">The unmanaged function pointer to be converted.</param>
|
|
/// <param name="t">The type of the delegate to be returned.</param>
|
|
/// <returns>A delegate instance that can be cast to the appropriate delegate type.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="t" /> parameter is not a delegate or is generic.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="ptr" /> parameter is <see langword="null" />.
|
|
/// -or-
|
|
/// The <paramref name="t" /> parameter is <see langword="null" />.</exception>
|
|
// Token: 0x06002B31 RID: 11057 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B31")]
|
|
[Address(RVA = "0x237F1D0", Offset = "0x237DFD0", VA = "0x18237F1D0")]
|
|
public static Delegate GetDelegateForFunctionPointer(IntPtr ptr, Type t)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>[Supported in the .NET Framework 4.5.1 and later versions]
|
|
/// Converts an unmanaged function pointer to a delegate of a specified type.</summary>
|
|
/// <param name="ptr">The unmanaged function pointer to convert.</param>
|
|
/// <typeparam name="TDelegate">The type of the delegate to return.</typeparam>
|
|
/// <returns>A instance of the specified delegate type.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="TDelegate" /> generic parameter is not a delegate, or it is an open generic type.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="ptr" /> parameter is <see langword="null" />.</exception>
|
|
// Token: 0x06002B32 RID: 11058 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002B32")]
|
|
[Address(RVA = "0x239CDC0", Offset = "0x239BBC0", VA = "0x18239CDC0")]
|
|
public static TDelegate GetDelegateForFunctionPointer<TDelegate>(IntPtr ptr)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06002B33 RID: 11059 RVA: 0x00016ED8 File Offset: 0x000150D8
|
|
[Token(Token = "0x6002B33")]
|
|
[Address(RVA = "0x237F4F0", Offset = "0x237E2F0", VA = "0x18237F4F0")]
|
|
private static IntPtr GetFunctionPointerForDelegateInternal(Delegate d)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>[Supported in the .NET Framework 4.5.1 and later versions]
|
|
/// Converts a delegate of a specified type to a function pointer that is callable from unmanaged code.</summary>
|
|
/// <param name="d">The delegate to be passed to unmanaged code.</param>
|
|
/// <typeparam name="TDelegate">The type of delegate to convert.</typeparam>
|
|
/// <returns>A value that can be passed to unmanaged code, which, in turn, can use it to call the underlying managed delegate.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="d" /> parameter is a generic type definition.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="d" /> parameter is <see langword="null" />.</exception>
|
|
// Token: 0x06002B34 RID: 11060 RVA: 0x00016EF0 File Offset: 0x000150F0
|
|
[Token(Token = "0x6002B34")]
|
|
[Address(RVA = "0x2174CB0", Offset = "0x2173AB0", VA = "0x182174CB0")]
|
|
public static IntPtr GetFunctionPointerForDelegate<TDelegate>(TDelegate d)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Represents the maximum size of a double byte character set (DBCS) size, in bytes, for the current operating system. This field is read-only.</summary>
|
|
// Token: 0x04001941 RID: 6465
|
|
[Token(Token = "0x4001941")]
|
|
public static readonly int SystemMaxDBCSCharSize;
|
|
|
|
/// <summary>Represents the default character size on the system; the default is 2 for Unicode systems and 1 for ANSI systems. This field is read-only.</summary>
|
|
// Token: 0x04001942 RID: 6466
|
|
[Token(Token = "0x4001942")]
|
|
public static readonly int SystemDefaultCharSize;
|
|
}
|
|
}
|