Opc.Ua.Com.ComUtils.GetInt32s C# (CSharp) Method

GetInt32s() public static method

Unmarshals and frees an array of 32 bit integers.
public static GetInt32s ( IntPtr &pArray, int size, bool deallocate ) : int[]
pArray System.IntPtr
size int
deallocate bool
return int[]
		public static int[] GetInt32s(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;
        }

Same methods

ComUtils::GetInt32s ( int input ) : IntPtr