/// <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); }
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); }
public virtual RecoveryError irecv_device_event_unsubscribe(RecoveryDeviceEventContextHandle context) { return(RecoveryNativeMethods.irecv_device_event_unsubscribe(context)); }
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)); }
public static extern RecoveryError irecv_device_event_unsubscribe(RecoveryDeviceEventContextHandle context);
public static extern RecoveryError irecv_device_event_subscribe(out RecoveryDeviceEventContextHandle context, RecoveryDeviceEventCallBack callback, System.IntPtr userData);