public override void CopyOut(System.IntPtr from, System.IntPtr to) { __Command nativeImg = (__Command)Marshal.PtrToStructure(from, typeof(__Command)); GCHandle tmpGCHandleTo = GCHandle.FromIntPtr(to); Command toObj = tmpGCHandleTo.Target as Command; CopyOut(ref nativeImg, ref toObj); tmpGCHandleTo.Target = toObj; }
public V_COPYIN_RESULT CopyIn(System.IntPtr typePtr, Command from, System.IntPtr to) { __Command nativeImg = new __Command(); 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 __Command from, ref Command to) { if (to == null) { to = new Command(); } to.bbg_id = from.bbg_id; to.daq_id = from.daq_id; to.fc = from.fc; to.msg = ReadString(from.msg); to.start = from.start != 0 ? true : false; }
public V_COPYIN_RESULT CopyIn(System.IntPtr typePtr, Command from, ref __Command to) { if (from == null) { return(V_COPYIN_RESULT.INVALID); } to.bbg_id = from.bbg_id; to.daq_id = from.daq_id; to.fc = from.fc; if (from.msg == null) { return(V_COPYIN_RESULT.INVALID); } // Unbounded string: bounds check not required... if (!Write(c.getBase(typePtr), ref to.msg, from.msg)) { return(V_COPYIN_RESULT.OUT_OF_MEMORY); } to.start = from.start ? (byte)1 : (byte)0; return(V_COPYIN_RESULT.OK); }
public static void StaticCopyOut(System.IntPtr from, ref Command to) { __Command nativeImg = (__Command)Marshal.PtrToStructure(from, typeof(__Command)); CopyOut(ref nativeImg, ref to); }