📄 func1_52nm.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>lineAnswer</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="lineAnswer">
<META NAME="MS-HAID" CONTENT="_tapi2_lineanswer">
</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_lineanswer"></A>lineAnswer</H1>
<P>The <B>lineAnswer</B> function answers the specified offering call. </P>
<PRE class=syntax><B>LONG WINAPI lineAnswer(
HCALL</B><I> hCall</I><B>, </B>
<B> LPCSTR</B><I> lpsUserUserInfo</I><B>, </B>
<B> DWORD</B><I> dwSize </I>
<B>);</B></PRE>
<H4>Parameters</H4>
<DL>
<DT><I>hCall</I> </DT>
<DD>A handle to the call to be answered. The application must be an owner of this call. The call state of <I>hCall</I> must be <I>offering</I> or <I>accepted</I>. </DD>
<DT><I>lpsUserUserInfo</I> </DT>
<DD>A pointer to a string containing user-user information to be sent to the remote party at the time the call is answered. This pointer can be left NULL if no user-user information is to be sent. User-user information is only sent if supported by the underlying network (see <A HREF="struc2_67aq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_67aq.htm"><B>LINEDEVCAPS</B></A>). The protocol discriminator field for the user-user information, if required, should appear as the first byte of the buffer pointed to by <I>lpsUserUserInfo</I>, and must be accounted for in <I>dwSize</I>. </DD>
<DT><I>dwSize</I> </DT>
<DD>The size in bytes of the user-user information in <I>lpsUserUserInfo</I>. If <I>lpsUserUserInfo</I> is NULL, no user-user information is sent to the calling party and <I>dwSize</I> is ignored.
</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_INUSE, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALCALLHANDLE, LINEERR_OPERATIONFAILED, LINEERR_INVALCALLSTATE, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALPOINTER, LINEERR_UNINITIALIZED, LINEERR_NOMEM, LINEERR_USERUSERINFOTOOBIG, LINEERR_NOTOWNER.</P>
<H4>Remarks</H4>
<P>When a new call arrives, applications with an interest in the call are sent a <A HREF="msgs_1xid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1xid.htm">LINE_CALLSTATE</A> message to provide the new call handle and to inform the application about the call's state and the privileges to the new call (such as monitor or owner). The application with owner privilege for the call can answer this call using <B>lineAnswer</B>. After the call has been successfully answered, the call typically transitions to the <I>connected</I> state. Initially, only one application is given owner privilege to the incoming call. </P>
<P>In some telephony environments (like ISDN), where user alerting is separate from call offering, the application can have the option to accept a call prior to answering or to reject or redirect the <I>offering</I> call. </P>
<P>If a call comes in (is offered) at the time another call is already active, invoking <B>lineAnswer</B> connects to the new call. The effect this has on the existing active call depends on the line's device capabilities. The first call can be unaffected, it can automatically be dropped, or it can automatically be placed on hold. The appropriate LINE_CALLSTATE messages report state transitions to the application about both calls. </P>
<P>In a bridged situation, if a call is connected but in the LINECONNECTEDMODE_INACTIVE state, it can be joined using the <B>lineAnswer</B> function. </P>
<P>The application has the option to send user-user information at the time of the answer. Even if user-user information can be sent, there is no guarantee that the network will deliver this information to the calling party. An application should consult a line's device capabilities to determine whether sending user-user information upon answering the call is available. </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_65mh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_65mh.htm">LINE_REPLY</A>, <A HREF="struc2_67aq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_67aq.htm"><B>LINEDEVCAPS</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 + -