public static GetUInt32s ( |
||
pArray | ||
size | int | |
deallocate | bool | |
리턴 | int[] |
public static int[] GetUInt32s(ref IntPtr pArray, int size, bool deallocate)
{
if (pArray == IntPtr.Zero || size <= 0)
{
return null;
}
int[] array = new int[size];
Marshal.Copy(pArray, array, 0, size);
if (deallocate)
{
Marshal.FreeCoTaskMem(pArray);
pArray = IntPtr.Zero;
}
return array;
}