Ejemplo n.º 1
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.º 2
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.º 3
0
                public static void FreeManagedPtr_inner(System.IntPtr ptr)
                {
                    Foo_Struct obj = (Foo_Struct)Marshal.PtrToStructure(ptr, typeof(Foo_Struct));

                    if (obj._owner != 0x972f3813)
                    {
                        throw new System.InvalidOperationException();
                    }
                    XobotOS.Runtime.MarshalGlue.Array_int_Helper.FreeManagedPtr(obj.a);
                }
Ejemplo n.º 4
0
                public static martin.Test.Foo NativeToManaged(System.IntPtr ptr)
                {
                    if (ptr == System.IntPtr.Zero)
                    {
                        return(null);
                    }
                    Foo_Struct obj = (Foo_Struct)Marshal.PtrToStructure(ptr, typeof(Foo_Struct));

                    martin.Test.Foo arg = new martin.Test.Foo();
                    arg.hello = obj.hello;
                    arg.a     = XobotOS.Runtime.MarshalGlue.Array_int_Helper.NativeToManaged(obj.a);
                    return(arg);
                }
Ejemplo n.º 5
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);
				}