public static void CopyOut(ref __Aircraft from, ref DM.Aircraft to)
 {
     if (to == null)
     {
         to = new DM.Aircraft();
     }
     to.tailNumber = ReadString(from.tailNumber);
     to.aircraftID = from.aircraftID;
 }
        public override void CopyOut(System.IntPtr from, System.IntPtr to)
        {
            __Aircraft nativeImg     = (__Aircraft)Marshal.PtrToStructure(from, typeof(__Aircraft));
            GCHandle   tmpGCHandleTo = GCHandle.FromIntPtr(to);

            DM.Aircraft toObj = tmpGCHandleTo.Target as DM.Aircraft;
            CopyOut(ref nativeImg, ref toObj);
            tmpGCHandleTo.Target = toObj;
        }
        public V_COPYIN_RESULT CopyIn(System.IntPtr typePtr, DM.Aircraft from, System.IntPtr to)
        {
            __Aircraft      nativeImg = new __Aircraft();
            V_COPYIN_RESULT result    = CopyIn(typePtr, from, ref nativeImg);

            if (result == V_COPYIN_RESULT.OK)
            {
                Marshal.StructureToPtr(nativeImg, to, false);
            }
            return(result);
        }
 public V_COPYIN_RESULT CopyIn(System.IntPtr typePtr, DM.Aircraft from, ref __Aircraft to)
 {
     if (from == null)
     {
         return(V_COPYIN_RESULT.INVALID);
     }
     if (from.tailNumber == null)
     {
         return(V_COPYIN_RESULT.INVALID);
     }
     // Unbounded string: bounds check not required...
     if (!Write(c.getBase(typePtr), ref to.tailNumber, from.tailNumber))
     {
         return(V_COPYIN_RESULT.OUT_OF_MEMORY);
     }
     to.aircraftID = from.aircraftID;
     return(V_COPYIN_RESULT.OK);
 }
        public static void StaticCopyOut(System.IntPtr from, ref DM.Aircraft to)
        {
            __Aircraft nativeImg = (__Aircraft)Marshal.PtrToStructure(from, typeof(__Aircraft));

            CopyOut(ref nativeImg, ref to);
        }