public static int usbmuxd_get_tcp_endpoint(out string host, ref ushort port) { System.Runtime.InteropServices.ICustomMarshaler hostMarshaler = NativeStringMarshaler.GetInstance(null); System.IntPtr hostNative = System.IntPtr.Zero; int returnValue = UsbmuxdNativeMethods.usbmuxd_get_tcp_endpoint(out hostNative, ref port); host = ((string)hostMarshaler.MarshalNativeToManaged(hostNative)); hostMarshaler.CleanUpNativeData(hostNative); return(returnValue); }
/// <summary> /// Gets the TCP endpoint to which usbmuxd will connect if th esocket type is set to /// SOCKET_TYPE_TCP /// </summary> /// <param name="host"> /// A pointer which will be set to the hostname or IP address to which to connect. /// The caller must free this string. /// </param> /// <param name="port"> /// The port to which to connect /// </param> /// <returns> /// 0 on success or negative on error /// </returns> public virtual int usbmuxd_get_tcp_endpoint(out string host, ref ushort port) { return(UsbmuxdNativeMethods.usbmuxd_get_tcp_endpoint(out host, ref port)); }