⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 func2_7prn.htm

📁 TAPI Exampple
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML DIR="LTR"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso8859-1">
</HEAD>
<TITLE>lineSetNumRings</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="lineSetNumRings">
<META NAME="MS-HAID" CONTENT="_tapi2_linesetnumrings">
</HEAD>
<BODY TOPMARGIN="0">

<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<!--SYNC_START-->
<script language="JavaScript" src='/library/synch.js'></script>
<!--SYNC_END-->

<H1><A NAME="_tapi2_linesetnumrings"></A>lineSetNumRings</H1>

<P>The <B>lineSetNumRings</B> function sets the number of rings that must occur before an incoming call is answered. This function can be used to implement a toll-saver-style function. It allows multiple independent applications to each register the number of rings. The function <A HREF="func1_0d6b.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_0d6b.htm"><B>lineGetNumRings</B></A> returns the minimum number of rings requested. It can be used by the application that answers incoming calls to determine the number of rings it should wait before answering the call. </P>

<PRE class=syntax><B>LONG WINAPI lineSetNumRings(
  HLINE</B><I> hLine</I><B>,        </B>
<B>  DWORD</B><I> dwAddressID</I><B>,  </B>
<B>  DWORD</B><I> dwNumRings    </I>
<B>);</B></PRE>

<H4>Parameters</H4>

<DL>
<DT><I>hLine</I> </DT>

<DD>A handle to the open line device. </DD>

<DT><I>dwAddressID</I> </DT>

<DD>An address on the line device. An address identifier is permanently associated with an address; the identifier remains constant across operating system upgrades.</DD>

<DT><I>dwNumRings</I> </DT>

<DD>The number of rings before a call should be answered in order to honor the toll-saver requests from all applications. 
</DD>
</DL>

<H4>Return Values</H4>

<P>Returns zero if the request succeeds or a negative error number if an error occurs. Possible return values are: </P>

<P>LINEERR_INVALLINEHANDLE, LINEERR_OPERATIONFAILED, LINEERR_INVALADDRESSID, LINEERR_RESOURCEUNAVAIL, LINEERR_NOMEM, LINEERR_UNINITIALIZED.</P>

<H4>Remarks</H4>

<P>The <A HREF="func1_0d6b.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_0d6b.htm"><B>lineGetNumRings</B></A> and <B>lineSetNumRings</B> functions, when used in combination, provide a mechanism to support the implementation of toll-saver features across multiple independent applications. If no application ever calls <B>lineSetNumRings</B>, <B>lineGetNumRings</B> returns 0xFFFFFFFF. </P>

<P>An application that is the owner of a call in the <I>offering</I> state and that received a <A HREF="msgs_402t.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_402t.htm">LINE_LINEDEVSTATE</A> <I>ringing</I> message should wait a number of rings equal to the number returned by <B>lineGetNumRings</B> before answering the call in order to honor the toll-saver settings across all applications. A separate LINE_LINEDEVSTATE <I>ringing</I> message is sent to the application for each ring cycle, so the application should count these messages. If this call disconnects before being answered, and another call comes in shortly thereafter, the <A HREF="msgs_1xid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1xid.htm">LINE_CALLSTATE</A> message should allow the application to determine that ringing is related to the second call. </P>

<P>If call classification is performed by TAPI by means of answering incoming calls of unknown media type and filtering the media stream, TAPI honors this number as well. </P>

<P class=note><B>Note</B>&nbsp;&nbsp;This operation is purely informational and does not affect the state of any calls on the line device. </P>

<H4><A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/sdkintro/guide_927n.htm  \n\n这个文件不能通过 Teleport Pro 取回, 因为 地址在一个域或为它的开始地址设定的边界的外部路径上.  \n\n你想从服务器打开它吗?'))window.location='http://msdn.microsoft.com/library/psdk/sdkintro/guide_927n.htm'" tppabs="http://msdn.microsoft.com/library/psdk/sdkintro/guide_927n.htm">Requirements</A> </H4>

<P><B>&nbsp;&nbsp;Windows NT/2000: </B>Requires Windows NT 4.0 SP3 or later.<BR>
<B>&nbsp;&nbsp;Windows 95/98: </B>Requires Windows 95 or later.<BR>
<B>&nbsp;&nbsp;Version: </B>Requires TAPI 1.3 or later.<BR>
<B>&nbsp;&nbsp;Header: </B>Declared in Tapi.h.<BR>
<B>&nbsp;&nbsp;Library: </B>Use Tapi32.lib.</P>

<H4>See Also</H4>

<P><A HREF="quickref_1okl.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/quickref_1okl.htm">TAPI 2.2 Reference Overview</A>, <A HREF="quickref_1pnp.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/quickref_1pnp.htm">Basic Telephony Services Reference</A>, <A HREF="msgs_1xid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1xid.htm">LINE_CALLSTATE</A>, <A HREF="msgs_402t.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_402t.htm">LINE_LINEDEVSTATE</A>, <A HREF="func1_0d6b.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_0d6b.htm"><B>lineGetNumRings</B></A></P>
<DIV CLASS="footer">Built on Monday, August 14, 2000</DIV>
<!--FOOTER_START-->
<DIV CLASS="footer" STYLE="color:#000000;font-size:90%;">
<A HREF="mailto:sdkfdbk@microsoft.com">Send feedback</A> to the Platform SDK.</P>
<P><A HREF="javascript:if(confirm('http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm  \n\n这个文件不能通过 Teleport Pro 取回, 因为 地址在一个域或为它的开始地址设定的边界的外部路径上.  \n\n你想从服务器打开它吗?'))window.location='http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm'" tppabs="http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm" TARGET="_top">&#169; 1999 Microsoft Corporation. All rights reserved. Terms of use.</A></P>
</DIV>
<!--FOOTER_END-->

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -