/// <summary>
        /// Creates a new <see cref="RecoveryDeviceEventContextHandle"/> 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 RecoveryDeviceEventContextHandle DangerousCreate(System.IntPtr unsafeHandle, bool ownsHandle)
        {
            RecoveryDeviceEventContextHandle safeHandle = new RecoveryDeviceEventContextHandle(ownsHandle);

            safeHandle.SetHandle(unsafeHandle);
            return(safeHandle);
        }
Example #2
0
        public virtual RecoveryError irecv_device_event_subscribe(out RecoveryDeviceEventContextHandle context, RecoveryDeviceEventCallBack callback, System.IntPtr userData)
        {
            RecoveryError returnValue;

            returnValue = RecoveryNativeMethods.irecv_device_event_subscribe(out context, callback, userData);
            context.Api = this.Parent;
            return(returnValue);
        }
Example #3
0
 public virtual RecoveryError irecv_device_event_unsubscribe(RecoveryDeviceEventContextHandle context)
 {
     return(RecoveryNativeMethods.irecv_device_event_unsubscribe(context));
 }
Example #4
0
 public object MarshalNativeToManaged(System.IntPtr nativeData)
 {
     return(RecoveryDeviceEventContextHandle.DangerousCreate(nativeData, false));
 }
 /// <summary>
 /// Creates a new <see cref="RecoveryDeviceEventContextHandle"/> from a <see cref="IntPtr"/>.
 /// </summary>
 /// <param name="unsafeHandle">
 /// The underlying <see cref="IntPtr"/>
 /// </param>
 /// <returns>
 /// </returns>
 public static RecoveryDeviceEventContextHandle DangerousCreate(System.IntPtr unsafeHandle)
 {
     return(RecoveryDeviceEventContextHandle.DangerousCreate(unsafeHandle, true));
 }
Example #6
0
 public static extern RecoveryError irecv_device_event_unsubscribe(RecoveryDeviceEventContextHandle context);
Example #7
0
 public static extern RecoveryError irecv_device_event_subscribe(out RecoveryDeviceEventContextHandle context, RecoveryDeviceEventCallBack callback, System.IntPtr userData);