Beispiel #1
0
        public static int usbmuxd_read_pair_record(string recordId, out string recordData, ref uint recordSize)
        {
            System.Runtime.InteropServices.ICustomMarshaler recordDataMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr recordDataNative = System.IntPtr.Zero;
            int           returnValue      = UsbmuxdNativeMethods.usbmuxd_read_pair_record(recordId, out recordDataNative, ref recordSize);

            recordData = ((string)recordDataMarshaler.MarshalNativeToManaged(recordDataNative));
            recordDataMarshaler.CleanUpNativeData(recordDataNative);
            return(returnValue);
        }
Beispiel #2
0
 /// <summary>
 /// Read a pairing record
 /// </summary>
 /// <param name="record_id">
 /// the record identifier of the pairing record to retrieve
 /// </param>
 /// <param name="record_data">
 /// pointer to a variable that will be set to point to a
 /// newly allocated buffer containing the pairing record data
 /// </param>
 /// <param name="record_size">
 /// pointer to a variable that will be set to the size of
 /// the buffer returned in record_data
 /// </param>
 /// <returns>
 /// 0 on success, a negative error value otherwise.
 /// </returns>
 public virtual int usbmuxd_read_pair_record(string recordId, out string recordData, ref uint recordSize)
 {
     return(UsbmuxdNativeMethods.usbmuxd_read_pair_record(recordId, out recordData, ref recordSize));
 }