?? func1_36jo.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>lineForward</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="lineForward">
<META NAME="MS-HAID" CONTENT="_tapi2_lineforward">
</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_lineforward"></A>lineForward</H1>
<P>The <B>lineForward </B>function forwards calls destined for the specified address on the specified line, according to the specified forwarding instructions. When an originating address (<I>dwAddressID</I>) is forwarded, the specified incoming calls for that address are deflected to the other number by the switch. This function provides a combination of forward and do-not-disturb features. This function can also cancel forwarding currently in effect. </P>
<PRE class=syntax><B>LONG WINAPI lineForward(
HLINE</B><I> hLine</I><B>, </B>
<B> DWORD</B><I> bAllAddresses</I><B>, </B>
<B> DWORD</B><I> dwAddressID</I><B>, </B>
<B> LPLINEFORWARDLIST const</B><I> lpForwardList</I><B>, </B>
<B> DWORD</B><I> dwNumRingsNoAnswer</I><B>, </B>
<B> LPHCALL</B><I> lphConsultCall</I><B>, </B>
<B> LPLINECALLPARAMS const</B><I> lpCallParams </I>
<B>);</B></PRE>
<H4>Parameters</H4>
<DL>
<DT><I>hLine</I> </DT>
<DD>A handle to the line device. </DD>
<DT><I>bAllAddresses</I> </DT>
<DD>Specifies whether all originating addresses on the line or just the one specified is to be forwarded. If TRUE, all addresses on the line are forwarded and <I>dwAddressID</I> is ignored; if FALSE, only the address specified as <I>dwAddressID</I> is forwarded. </DD>
<DT><I>dwAddressID</I> </DT>
<DD>The address on the specified line whose incoming calls are to be forwarded. This parameter is ignored if <I>bAllAddresses</I> is TRUE.
<P>An address identifier is permanently associated with an address; the identifier remains constant across operating system upgrades.
</DD>
<DT><I>lpForwardList</I> </DT>
<DD>A pointer to a variably sized data structure that describes the specific forwarding instructions, of type <A HREF="struc2_4rqq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_4rqq.htm"><B>LINEFORWARDLIST</B></A>. </DD>
<DT><I>dwNumRingsNoAnswer</I> </DT>
<DD>The number of rings before a call is considered a "no answer." If <I>dwNumRingsNoAnswer</I> is out of range, the actual value is set to the nearest value in the allowable range. </DD>
<DT><I>lphConsultCall</I> </DT>
<DD>A pointer to an HCALL location. In some telephony environments, this location is loaded with a handle to a consultation call that is used to consult the party that is being forwarded to, and the application becomes the initial sole owner of this call. This pointer must be valid even in environments where call forwarding does not require a consultation call. This handle is set to NULL if no consultation call is created. </DD>
<DT><I>lpCallParams</I> </DT>
<DD>A pointer to a structure of type <A HREF="struc1_904y.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_904y.htm"><B>LINECALLPARAMS</B></A>. This pointer is ignored unless <B>lineForward</B> requires the establishment of a call to the forwarding destination (and <I>lphConsultCall</I> is returned, in which case <I>lpCallParams</I> is optional). If NULL, default call parameters are used. Otherwise, the specified call parameters are used for establishing <I>hConsultCall</I>.
</DD>
</DL>
<H4>Return Values</H4>
<P>Returns a positive request identifier if the function is completed asynchronously, or a negative error number if an error occurs. The <I>dwParam2</I> parameter of the corresponding <A HREF="msgs_65mh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_65mh.htm">LINE_REPLY</A> message is zero if the function succeeds or it is a negative error number if an error occurs. Possible return values are: </P>
<P>LINEERR_INVALLINEHANDLE, LINEERR_NOMEM, LINEERR_INVALADDRESSID, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALADDRESS, LINEERR_OPERATIONFAILED, LINEERR_INVALCOUNTRYCODE, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALPOINTER, LINEERR_STRUCTURETOOSMALL, LINEERR_INVALPARAM, LINEERR_UNINITIALIZED.</P>
<H4>Remarks</H4>
<P>A successful forwarding indicates only that the request has been accepted by the service provider, not that forwarding is set up at the switch. A <A HREF="msgs_3v51.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_3v51.htm">LINE_ADDRESSSTATE</A> (forwarding) message provides confirmation for forwarding having been set up at the switch. </P>
<P>Forwarding of the address(es) remains in effect until this function is called again. The most recent forwarding list replaces the old one. Forwarding can be canceled by specifying a NULL pointer as <I>lpForwardList</I>. If a NULL destination address is specified for an entry in the forwarding list, the operation acts as a do-not-disturb. </P>
<P>Forwarding status of an address can also be affected externally; for example, by administrative actions at the switch or by a user from another station. It may not be possible for the service provider to be aware of this state change, and it may not be able to keep in synchronization with the forwarding state known to the switch. </P>
<P>Because a service provider may not know the forwarding state of the address "for sure" (that is, it may have been forwarded or unforwarded in an unknown way), <B>lineForward</B> succeeds unless it fails to set the new forwarding instructions. In other words, a request that all forwarding be canceled at a time that there is no forwarding in effect is successful. This is because there is no "unforwarding"梱ou can only change the previous set of forwarding instructions. </P>
<P>The success or failure of this operation does not depend on the previous set of forwarding instructions, and the same is true when setting different forwarding instructions. The provider should "unforward everything" prior to setting the new forwarding instructions. Because this can take time in analog telephony environments, a provider may also want to compare the current forwarding with the new one, and only issue instructions to the switch to get to the final state (leaving unchanged forwarding unaffected). </P>
<P>Invoking <B>lineForward</B> when <A HREF="struc2_4rqq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_4rqq.htm"><B>LINEFORWARDLIST</B></A> has <I>dwNumEntries</I> set to zero has the same effect as providing a NULL <I>lpForwardList</I> parameter. It cancels all forwarding currently in effect. </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.<BR>
<B> Unicode: </B>Implemented as Unicode and ANSI versions on all platforms.</P>
<H4>See Also</H4>
<P><A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/tapi3/tapiovr2_5kdu.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/tapi3/tapiovr2_5kdu.htm'" tppabs="http://msdn.microsoft.com/library/psdk/tapi3/tapiovr2_5kdu.htm">Forward Overview</A>, <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_6gvn.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/quickref_6gvn.htm">Supplementary Line Service Functions</A>, <A HREF="msgs_3v51.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_3v51.htm">LINE_ADDRESSSTATE</A>, <A HREF="msgs_65mh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_65mh.htm">LINE_REPLY</A>, <A HREF="struc1_904y.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_904y.htm"><B>LINECALLPARAMS</B></A>, <A HREF="struc2_4rqq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_4rqq.htm"><B>LINEFORWARDLIST</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 + -