<PackageReference Include="System.Runtime.InteropServices.PInvoke" Version="4.0.0-rc2-24027" />

System.Runtime.InteropServices.PInvokeMarshal

public static class PInvokeMarshal
public static readonly int SystemDefaultCharSize

public static readonly int SystemMaxDBCSCharSize

public static IntPtr AllocateMemory(int sizeInBytes)

public static void DestroyStructure(IntPtr ptr, Type structureType)

public static void DestroyStructure<T>(IntPtr ptr)

public static void FreeMemory(IntPtr ptr)

public static Delegate GetDelegateForFunctionPointer(IntPtr ptr, Type delegateType)

public static TDelegate GetDelegateForFunctionPointer<TDelegate>(IntPtr ptr)

public static IntPtr GetFunctionPointerForDelegate(Delegate d)

public static IntPtr GetFunctionPointerForDelegate<TDelegate>(TDelegate d)

public static int GetLastError()

public static IntPtr OffsetOf(Type type, string fieldName)

public static IntPtr OffsetOf<T>(string fieldName)

public static string PtrToStringAnsi(IntPtr ptr)

public static string PtrToStringAnsi(IntPtr ptr, int len)

public static string PtrToStringUTF16(IntPtr ptr)

public static string PtrToStringUTF16(IntPtr ptr, int len)

public static void PtrToStructure(IntPtr ptr, object structure)

public static object PtrToStructure(IntPtr ptr, Type structureType)

public static T PtrToStructure<T>(IntPtr ptr)

public static void PtrToStructure<T>(IntPtr ptr, T structure)

public static IntPtr ReallocateMemory(IntPtr ptr, int sizeInBytes)

public static int SizeOf(object structure)

public static int SizeOf(Type type)

public static int SizeOf<T>()

public static IntPtr StringToAllocatedMemoryAnsi(string s)

public static IntPtr StringToAllocatedMemoryUTF16(string s)

public static void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld)

public static void StructureToPtr<T>(T structure, IntPtr ptr, bool fDeleteOld)

public static IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index)

public static IntPtr UnsafeAddrOfPinnedArrayElement<T>(T[] arr, int index)

public static void ZeroFreeMemoryAnsi(IntPtr s)

public static void ZeroFreeMemoryUTF16(IntPtr s)