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); }
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); }
public static void FreeManagedPtr_inner(System.IntPtr ptr) { Complex_Struct obj = (Complex_Struct)Marshal.PtrToStructure(ptr, typeof(Complex_Struct )); if (obj._owner != 0x972f3813) { throw new System.InvalidOperationException(); } Array_Foo_Helper.FreeManagedPtr(obj.foo); XobotOS.Runtime.MarshalGlue.String_Helper.FreeManagedPtr(obj.str); }
public static martin.Test.Complex NativeToManaged(System.IntPtr ptr) { if (ptr == System.IntPtr.Zero) { return(null); } Complex_Struct obj = (Complex_Struct)Marshal.PtrToStructure(ptr, typeof(Complex_Struct )); martin.Test.Complex arg = new martin.Test.Complex(); arg.foo = Array_Foo_Helper.NativeToManaged(obj.foo); arg.str = XobotOS.Runtime.MarshalGlue.String_Helper.NativeToManaged(obj.str); return(arg); }