?? func2_7prn.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> 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> Windows NT/2000: </B>Requires Windows NT 4.0 SP3 or later.<BR>
<B> Windows 95/98: </B>Requires Windows 95 or later.<BR>
<B> Version: </B>Requires TAPI 1.3 or later.<BR>
<B> Header: </B>Declared in Tapi.h.<BR>
<B> 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">© 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 + -