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); }
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); }
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); }
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); }
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); }