Ejemplo n.º 1
0
			public static System.IntPtr ManagedToNative(martin.Test.Foo[] arg)
			{
				if (arg == null)
				{
					return System.IntPtr.Zero;
				}
				System.IntPtr ptr = Marshal.AllocHGlobal(Array_Foo_Helper.NativeSize + martin.Test.Foo
					.Foo_Helper.NativeSize * arg.Length);
				Array_Foo_Helper.MarshalIn(ptr, arg);
				return ptr;
			}
Ejemplo n.º 2
0
			public static void MarshalIn(System.IntPtr ptr, martin.Test.Foo[] arg)
			{
				Array_Foo_Struct obj = new Array_Foo_Struct();
				obj._owner = 0x972f3813;
				obj.length = arg.Length;
				{
					obj.ptr = ptr + Array_Foo_Helper.NativeSize;
					System.IntPtr addr = obj.ptr;
					for (int i = 0; i < arg.Length; i++, addr += martin.Test.Foo.Foo_Helper.NativeSize)
					{
						martin.Test.Foo.Foo_Helper.MarshalIn(addr, arg[i]);
					}
				}
				Marshal.StructureToPtr(obj, ptr, false);
			}
Ejemplo n.º 3
0
			public static void MarshalOut(System.IntPtr ptr, martin.Test.Foo[] arg)
			{
				Array_Foo_Struct obj = (Array_Foo_Struct)Marshal.PtrToStructure(ptr, typeof(Array_Foo_Struct
					));
				if (obj.length != arg.Length)
				{
					throw new System.InvalidOperationException();
				}
				{
					System.IntPtr addr = obj.ptr;
					for (int i = 0; i < obj.length; i++, addr += martin.Test.Foo.Foo_Helper.NativeSize)
					{
						martin.Test.Foo.Foo_Helper.MarshalOut(addr, arg[i]);
					}
				}
			}
Ejemplo n.º 4
0
				public static void MarshalOut(System.IntPtr ptr, martin.Test.Complex arg)
				{
					Complex_Struct obj = (Complex_Struct)Marshal.PtrToStructure(ptr, typeof(Complex_Struct
						));
					arg.foo = Array_Foo_Helper.NativeToManaged(obj.foo);
					arg.str = XobotOS.Runtime.MarshalGlue.String_Helper.NativeToManaged(obj.str);
				}
Ejemplo n.º 5
0
				public static System.IntPtr ManagedToNative(martin.Test.Complex arg)
				{
					if (arg == null)
					{
						return System.IntPtr.Zero;
					}
					System.IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Complex_Struct)));
					martin.Test.Complex.Complex_Helper.MarshalIn(ptr, arg);
					return ptr;
				}
Ejemplo n.º 6
0
				public static void MarshalOut(System.IntPtr ptr, martin.Test.Blittable arg)
				{
					Blittable_Struct obj = (Blittable_Struct)Marshal.PtrToStructure(ptr, typeof(Blittable_Struct
						));
					arg.hello = obj.hello;
				}
Ejemplo n.º 7
0
				public static void MarshalIn(System.IntPtr ptr, martin.Test.Complex arg)
				{
					Complex_Struct obj = new Complex_Struct();
					obj._owner = 0x972f3813;
					obj.foo = Array_Foo_Helper.ManagedToNative(arg.foo);
					obj.str = XobotOS.Runtime.MarshalGlue.String_Helper.ManagedToNative(arg.str);
					Marshal.StructureToPtr(obj, ptr, false);
				}
Ejemplo n.º 8
0
				public static void MarshalOut(System.IntPtr ptr, martin.Test.Foo arg)
				{
					Foo_Struct obj = (Foo_Struct)Marshal.PtrToStructure(ptr, typeof(Foo_Struct));
					arg.hello = obj.hello;
					arg.a = XobotOS.Runtime.MarshalGlue.Array_int_Helper.NativeToManaged(obj.a);
				}
Ejemplo n.º 9
0
				public static void MarshalIn(System.IntPtr ptr, martin.Test.Blittable arg)
				{
					Blittable_Struct obj = new Blittable_Struct();
					obj._owner = 0x972f3813;
					obj.hello = arg.hello;
					Marshal.StructureToPtr(obj, ptr, false);
				}
Ejemplo n.º 10
0
		internal static void complex(martin.Test.Complex arg)
		{
			System.IntPtr arg_ptr = System.IntPtr.Zero;
			try
			{
				arg_ptr = martin.Test.Complex.Complex_Helper.ManagedToNative(arg);
				libxobotos_Test_complex(arg_ptr);
			}
			finally
			{
				martin.Test.Complex.Complex_Helper.FreeManagedPtr(arg_ptr);
			}
		}
Ejemplo n.º 11
0
				public static void MarshalIn(System.IntPtr ptr, martin.Test.Foo arg)
				{
					Foo_Struct obj = new Foo_Struct();
					obj._owner = 0x972f3813;
					obj.hello = arg.hello;
					obj.a = XobotOS.Runtime.MarshalGlue.Array_int_Helper.ManagedToNative(arg.a);
					Marshal.StructureToPtr(obj, ptr, false);
				}
Ejemplo n.º 12
0
		internal static void blittableRef(martin.Test.Blittable arg)
		{
			System.IntPtr arg_ptr = System.IntPtr.Zero;
			try
			{
				arg_ptr = martin.Test.Blittable.Blittable_Helper.ManagedToNative(arg);
				libxobotos_Test_blittableRef(arg_ptr);
				martin.Test.Blittable.Blittable_Helper.MarshalOut(arg_ptr, arg);
			}
			finally
			{
				martin.Test.Blittable.Blittable_Helper.FreeManagedPtr(arg_ptr);
			}
		}
Ejemplo n.º 13
0
		internal static void outFunc(martin.Test.Foo arg)
		{
			System.IntPtr arg_ptr = System.IntPtr.Zero;
			try
			{
				libxobotos_Test_outFunc(out arg_ptr);
				martin.Test.Foo.Foo_Helper.MarshalOut(arg_ptr, arg);
			}
			finally
			{
				martin.Test.Foo.Foo_Helper.FreeNativePtr(arg_ptr);
			}
		}
Ejemplo n.º 14
0
		internal static void refFunc(martin.Test.Foo arg)
		{
			System.IntPtr arg_ptr = System.IntPtr.Zero;
			try
			{
				arg_ptr = martin.Test.Foo.Foo_Helper.ManagedToNative(arg);
				libxobotos_Test_refFunc(arg_ptr);
				martin.Test.Foo.Foo_Helper.MarshalOut(arg_ptr, arg);
			}
			finally
			{
				martin.Test.Foo.Foo_Helper.FreeManagedPtr(arg_ptr);
			}
		}
Ejemplo n.º 15
0
		internal static void bar(martin.Test.Foo[] arg)
		{
			System.IntPtr arg_ptr = System.IntPtr.Zero;
			try
			{
				arg_ptr = Array_Foo_Helper.ManagedToNative(arg);
				libxobotos_Test_bar(arg_ptr);
			}
			finally
			{
				Array_Foo_Helper.FreeManagedPtr(arg_ptr);
			}
		}
Ejemplo n.º 16
0
		internal static void foo(martin.Test.Foo arg)
		{
			System.IntPtr arg_ptr = System.IntPtr.Zero;
			try
			{
				arg_ptr = martin.Test.Foo.Foo_Helper.ManagedToNative(arg);
				libxobotos_Test_foo(arg_ptr);
			}
			finally
			{
				martin.Test.Foo.Foo_Helper.FreeManagedPtr(arg_ptr);
			}
		}