Beispiel #1
0
        /// <summary>
        /// Creates a new <see cref="RecoveryDeviceHandle"/> from a <see cref="IntPtr"/>.
        /// </summary>
        /// <param name="unsafeHandle">
        /// The underlying <see cref="IntPtr"/>
        /// </param>
        /// <param name="ownsHandle">
        /// <see langword="true"/> to reliably release the handle during the finalization phase; <see langword="false"/> to prevent reliable release (not recommended).
        /// </param>
        /// <returns>
        /// </returns>
        public static RecoveryDeviceHandle DangerousCreate(System.IntPtr unsafeHandle, bool ownsHandle)
        {
            RecoveryDeviceHandle safeHandle = new RecoveryDeviceHandle(ownsHandle);

            safeHandle.SetHandle(unsafeHandle);
            return(safeHandle);
        }
Beispiel #2
0
 public object MarshalNativeToManaged(System.IntPtr nativeData)
 {
     return(RecoveryDeviceHandle.DangerousCreate(nativeData, false));
 }
Beispiel #3
0
        public virtual RecoveryError irecv_devices_get_device_by_hardware_model(string hardwareModel, out RecoveryDeviceHandle device)
        {
            RecoveryError returnValue;

            returnValue = RecoveryNativeMethods.irecv_devices_get_device_by_hardware_model(hardwareModel, out device);
            device.Api  = this.Parent;
            return(returnValue);
        }
Beispiel #4
0
        public virtual RecoveryError irecv_devices_get_device_by_product_type(string productType, out RecoveryDeviceHandle device)
        {
            RecoveryError returnValue;

            returnValue = RecoveryNativeMethods.irecv_devices_get_device_by_product_type(productType, out device);
            device.Api  = this.Parent;
            return(returnValue);
        }
Beispiel #5
0
        public virtual RecoveryError irecv_devices_get_device_by_client(RecoveryClientHandle client, out RecoveryDeviceHandle device)
        {
            RecoveryError returnValue;

            returnValue = RecoveryNativeMethods.irecv_devices_get_device_by_client(client, out device);
            device.Api  = this.Parent;
            return(returnValue);
        }
 public static extern RecoveryError irecv_devices_get_device_by_hardware_model([System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string hardwareModel, out RecoveryDeviceHandle device);
 public static extern RecoveryError irecv_devices_get_device_by_product_type([System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string productType, out RecoveryDeviceHandle device);
 public static extern RecoveryError irecv_devices_get_device_by_client(RecoveryClientHandle client, out RecoveryDeviceHandle device);
Beispiel #9
0
 /// <summary>
 /// Creates a new <see cref="RecoveryDeviceHandle"/> from a <see cref="IntPtr"/>.
 /// </summary>
 /// <param name="unsafeHandle">
 /// The underlying <see cref="IntPtr"/>
 /// </param>
 /// <returns>
 /// </returns>
 public static RecoveryDeviceHandle DangerousCreate(System.IntPtr unsafeHandle)
 {
     return(RecoveryDeviceHandle.DangerousCreate(unsafeHandle, true));
 }