Wombat.MamaMsg.addVectorU32 C# (CSharp) Method

addVectorU32() public method

Add an array of unsigned 32 bit integers to the message.
public addVectorU32 ( string name, ushort fid, uint val ) : void
name string
fid ushort
val uint
return void
        public void addVectorU32(
			string name,
			ushort fid,
			uint[] val)
        {
            EnsurePeerCreated();
            IntPtr ptr = Marshal.AllocHGlobal(val.Length * 4);
            try
            {
                int[] loc = new int[val.Length];
                for (int i = 0; i < val.Length; i++)
                {
                    loc[i] = (int)val[i];
                }
                Marshal.Copy(loc,0, ptr, val.Length);
                int code = NativeMethods.mamaMsg_addVectorU32(nativeHandle, name, fid, ptr,val.Length);
                CheckResultCode(code);
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }
MamaMsg