public static extern MobileSyncError mobilesync_start(MobileSyncClientHandle client, byte[] dataClass, MobileSyncAnchorsHandle anchors, ulong computerDataClassVersion, ref MobileSyncSyncType syncType, ref ulong deviceDataClassVersion, out System.IntPtr errorDescription);
Example #2
0
        public static MobileSyncError mobilesync_start(MobileSyncClientHandle client, byte[] dataClass, MobileSyncAnchorsHandle anchors, ulong computerDataClassVersion, ref MobileSyncSyncType syncType, ref ulong deviceDataClassVersion, out string errorDescription)
        {
            System.Runtime.InteropServices.ICustomMarshaler errorDescriptionMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr   errorDescriptionNative = System.IntPtr.Zero;
            MobileSyncError returnValue            = MobileSyncNativeMethods.mobilesync_start(client, dataClass, anchors, computerDataClassVersion, ref syncType, ref deviceDataClassVersion, out errorDescriptionNative);

            errorDescription = ((string)errorDescriptionMarshaler.MarshalNativeToManaged(errorDescriptionNative));
            errorDescriptionMarshaler.CleanUpNativeData(errorDescriptionNative);
            return(returnValue);
        }
 /// <summary>
 /// Requests starting synchronization of a data class with the device
 /// MOBILESYNC_E_SUCCESS on success
 /// MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid
 /// MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid form
 /// MOBILESYNC_E_SYNC_REFUSED if the device refused to sync
 /// MOBILESYNC_E_CANCELLED if the device explicitly cancelled the
 /// sync request
 /// </summary>
 /// <param name="client">
 /// The mobilesync client
 /// </param>
 /// <param name="data_class">
 /// The data class identifier to sync
 /// </param>
 /// <param name="anchors">
 /// The anchors required to exchange with the device. The anchors
 /// allow the device to tell if the synchronization information on the computer
 /// and device are consistent to determine what sync type is required.
 /// </param>
 /// <param name="computer_data_class_version">
 /// The version of the data class storage on the computer
 /// </param>
 /// <param name="sync_type">
 /// A pointer to store the sync type reported by the device_anchor
 /// </param>
 /// <param name="device_data_class_version">
 /// The version of the data class storage on the device
 /// </param>
 /// <param name="error_description">
 /// A pointer to store an error message if reported by the device
 /// </param>
 public virtual MobileSyncError mobilesync_start(MobileSyncClientHandle client, byte[] dataClass, MobileSyncAnchorsHandle anchors, ulong computerDataClassVersion, ref MobileSyncSyncType syncType, ref ulong deviceDataClassVersion, out string errorDescription)
 {
     return(MobileSyncNativeMethods.mobilesync_start(client, dataClass, anchors, computerDataClassVersion, ref syncType, ref deviceDataClassVersion, out errorDescription));
 }