extern static public int lineOpen(IntPtr m_hLineApp, int dwDeviceID, out IntPtr lphLine, int dwAPIVersion, int dwExtVersion, IntPtr dwCallbackInstance, LINECALLPRIVILEGE dwPrivileges, LINEMEDIAMODE dwMediaModes, IntPtr lpCallParams);
/// <summary> /// Opens TAPI line /// </summary> /// <param name="deviceID">ID of the device to open. Must be less than <c>NumDevices</c></param> /// <param name="mode">combination of <c>LINEMEDIAMODE</c> flags</param> /// <param name="priv">combination of <c>LINECALLPRIVILEGE</c> flags</param> /// <returns>Newly created Line object</returns> public Line CreateLine(int deviceID, LINEMEDIAMODE mode, LINECALLPRIVILEGE priv) { IntPtr hLine; int ret = NativeTapi.lineOpen(m_hLineApp, deviceID, out hLine, NegotiateVersion(deviceID), 0, IntPtr.Zero, priv, mode, IntPtr.Zero); if (ret != 0) { throw new TapiException(ret); } Line line = new Line(this, hLine); Lines.Add(hLine, line); return(line); }