/// <summary> /// Creates a new <see cref="LockdownServiceDescriptorHandle"/> 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 LockdownServiceDescriptorHandle DangerousCreate(System.IntPtr unsafeHandle, bool ownsHandle) { LockdownServiceDescriptorHandle safeHandle = new LockdownServiceDescriptorHandle(ownsHandle); safeHandle.SetHandle(unsafeHandle); return(safeHandle); }
public object MarshalNativeToManaged(System.IntPtr nativeData) { return(LockdownServiceDescriptorHandle.DangerousCreate(nativeData, false)); }
/// <summary> /// Creates a new <see cref="LockdownServiceDescriptorHandle"/> from a <see cref="IntPtr"/>. /// </summary> /// <param name="unsafeHandle"> /// The underlying <see cref="IntPtr"/> /// </param> /// <returns> /// </returns> public static LockdownServiceDescriptorHandle DangerousCreate(System.IntPtr unsafeHandle) { return(LockdownServiceDescriptorHandle.DangerousCreate(unsafeHandle, true)); }
/// <summary> /// Requests to start a service and retrieve it's port on success. /// Sends the escrow bag from the device's pair record. /// </summary> /// <param name="client"> /// The lockdownd client /// </param> /// <param name="identifier"> /// The identifier of the service to start /// </param> /// <param name="service"> /// The service descriptor on success or NULL on failure /// </param> /// <returns> /// LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG if a parameter /// is NULL, LOCKDOWN_E_INVALID_SERVICE if the requested service is not known /// by the device, LOCKDOWN_E_START_SERVICE_FAILED if the service could not because /// started by the device, LOCKDOWN_E_INVALID_CONF if the host id or escrow bag are /// missing from the device record. /// </returns> public virtual LockdownError lockdownd_start_service_with_escrow_bag(LockdownClientHandle client, string identifier, out LockdownServiceDescriptorHandle service) { LockdownError returnValue; returnValue = LockdownNativeMethods.lockdownd_start_service_with_escrow_bag(client, identifier, out service); service.Api = this.Parent; return(returnValue); }
public static extern LockdownError lockdownd_start_service_with_escrow_bag(LockdownClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string identifier, out LockdownServiceDescriptorHandle service);