Table of Contents

Method ArrayToPtr

Namespace
Innova.Prism.Library.Security
Assembly
Innova.Prism.Library.dll

ArrayToPtr<T>(T[], UnmanagedType, ref IntPtr, ref int)

Marshals an array to unmanaged memory and updates a pointer to this memory and a size field. If the unmanaged memory pointer is not zero, it is freed first. The memory should be cleaned up by setting the array to null. Manually changing the pointer or the size field may lead to memory leaks or crashes. This function uses the COM allocator.

public static void ArrayToPtr<T>(T[] array, UnmanagedType type, ref IntPtr ptr, ref int size)

Parameters

array T[]
type UnmanagedType
ptr IntPtr
size int

Type Parameters

T

ArrayToPtr<T>(T[], UnmanagedType, ref IntPtr, ref uint)

Calls the other overload.

public static void ArrayToPtr<T>(T[] array, UnmanagedType type, ref IntPtr ptr, ref uint size)

Parameters

array T[]
type UnmanagedType
ptr IntPtr
size uint

Type Parameters

T