public override void CopyOut(System.IntPtr from, System.IntPtr to)
        {
            __ATC_Function nativeImg     = (__ATC_Function)Marshal.PtrToStructure(from, typeof(__ATC_Function));
            GCHandle       tmpGCHandleTo = GCHandle.FromIntPtr(to);

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

            if (result == V_COPYIN_RESULT.OK)
            {
                Marshal.StructureToPtr(nativeImg, to, false);
            }
            return(result);
        }
 public static void CopyOut(ref __ATC_Function from, ref DM.ATC_Function to)
 {
     if (to == null)
     {
         to = new DM.ATC_Function();
     }
     to.tailNumber = ReadString(from.tailNumber);
     DM.__l_WGS84Marshaler.CopyOut(ref from.position, ref to.position);
     to.time       = from.time;
     to.aircraftID = from.aircraftID;
     DM.__EGI_DataMarshaler.CopyOut(ref from.sensor, ref to.sensor);
     __AircraftMarshaler.CopyOut(ref from.aircraft, ref to.aircraft);
 }
 public V_COPYIN_RESULT CopyIn(System.IntPtr typePtr, DM.ATC_Function from, ref __ATC_Function 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);
     }
     {
         V_COPYIN_RESULT result = attr1Marshaler.CopyIn(typePtr, from.position, ref to.position);
         if (result != V_COPYIN_RESULT.OK)
         {
             return(result);
         }
     }
     to.time       = from.time;
     to.aircraftID = from.aircraftID;
     {
         V_COPYIN_RESULT result = attr4Marshaler.CopyIn(typePtr, from.sensor, ref to.sensor);
         if (result != V_COPYIN_RESULT.OK)
         {
             return(result);
         }
     }
     {
         V_COPYIN_RESULT result = attr5Marshaler.CopyIn(typePtr, from.aircraft, ref to.aircraft);
         if (result != V_COPYIN_RESULT.OK)
         {
             return(result);
         }
     }
     return(V_COPYIN_RESULT.OK);
 }
        public static void StaticCopyOut(System.IntPtr from, ref DM.ATC_Function to)
        {
            __ATC_Function nativeImg = (__ATC_Function)Marshal.PtrToStructure(from, typeof(__ATC_Function));

            CopyOut(ref nativeImg, ref to);
        }