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

GetInt16s() public static method

Allocates and marshals an array of 16 bit integers.
public static GetInt16s ( short input ) : IntPtr
input short
return System.IntPtr
		public static IntPtr GetInt16s(short[] input)
		{
			IntPtr output = IntPtr.Zero;

			if (input != null)
			{
				output = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(Int16))*input.Length);
				Marshal.Copy(input, 0, output, input.Length);
			}

			return output;
		}

Same methods

ComUtils::GetInt16s ( IntPtr &pArray, int size, bool deallocate ) : short[]