示例#1
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);
                }
示例#2
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);
                }
示例#3
0
                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);
                }
示例#4
0
                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);
                }
示例#5
0
文件: Test.cs 项目: hakeemsm/XobotOS
				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);
				}