?? func1_6tt2.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>lineHandoff</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="lineHandoff">
<META NAME="MS-HAID" CONTENT="_tapi2_linehandoff">
</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_linehandoff"></A>lineHandoff</H1>
<P>The <B>lineHandoff</B> function gives ownership of the specified call to another application. The application can be either specified directly by its file name or indirectly as the highest priority application that handles calls of the specified media mode. </P>
<PRE class=syntax><B>LONG WINAPI lineHandoff(
HCALL</B><I> hCall</I><B>, </B>
<B> LPCSTR</B><I> lpszFileName</I><B>, </B>
<B> DWORD</B><I> dwMediaMode </I>
<B>);</B></PRE>
<H4>Parameters</H4>
<DL>
<DT><I>hCall</I> </DT>
<DD>A handle to the call to be handed off. The application must be an owner of the call. The call state of <I>hCall</I> can be any state. </DD>
<DT><I>lpszFileName</I> </DT>
<DD>A pointer to a null-terminated string. If this pointer parameter is non-NULL, it contains the file name of the application that is the target of the handoff. If NULL, the handoff target is the highest priority application that has opened the line for owner privilege for the specified media mode. A valid file name does not include the path of the file. </DD>
<DT><I>dwMediaMode</I> </DT>
<DD>The media mode used to identify the target for the indirect handoff. The <I>dwMediaMode</I> parameter indirectly identifies the target application that is to receive ownership of the call. This parameter is ignored if <I>lpszFileName</I> is not NULL. This parameter uses one and only one of the <A HREF="constnts_0x6b.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/constnts_0x6b.htm">LINEMEDIAMODE_ Constants</A>.
</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_INVALCALLHANDLE, LINEERR_OPERATIONFAILED, LINEERR_INVALMEDIAMODE, LINEERR_TARGETNOTFOUND, LINEERR_INVALPOINTER, LINEERR_TARGETSELF, LINEERR_NOMEM, LINEERR_UNINITIALIZED, LINEERR_NOTOWNER.</P>
<H4>Remarks</H4>
<P>The <B>lineHandoff</B> function returns LINEERR_TARGETSELF if the calling application attempted an indirect handoff (that is, set the <I>lpszFileName</I> parameter to NULL) and TAPI determined that the application is itself the highest priority application for the given media mode. If LINEERR_TARGETNOTFOUND is returned, a target for the call handoff was not found. This can occur if the named application did not open the same line with the LINECALLPRIVILEGE_OWNER bit in the <I>dwPrivileges</I> parameter of <A HREF="func2_34by.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_34by.htm"><B>lineOpen</B></A>. Or, in the case of media-mode handoff, no application has opened the same line with the LINECALLPRIVILEGE_OWNER bit in the <I>dwPrivileges</I> parameter of <B>lineOpen</B> and with the media mode specified in the <I>dwMediaModes</I> parameter of <B>lineOpen</B>. </P>
<P>Call handoff allows ownership of a call to be passed among applications. There are two types of handoff. In the first type, if the application knows the file name of the target application, it can simply specify that file name. If an instance of the target application has opened the line device, ownership of the call is passed to the other application; otherwise, the handoff fails and an error is returned. This form of handoff succeeds if the call handle is handed off to the same file name as the application requesting the handoff. </P>
<P>The second type of handoff is based on media mode. In this case, the application indirectly specifies the target application by means of a media mode. The highest priority application that has currently opened the line device for that media mode is the target for the handoff. If there is no such application, the handoff fails and an error is returned. </P>
<P>The <B>lineHandoff</B> function does not change the media mode of a call. To change the media mode of a call, the application should use <A HREF="func2_9691.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_9691.htm"><B>lineSetMediaMode</B></A> on the call, specifying the new media mode. This changes the call's media mode as stored in the call's <A HREF="struc1_4oky.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_4oky.htm"><B>LINECALLINFO</B></A> structure. </P>
<P>If handoff succeeds, the receiving application receives a <A HREF="msgs_1xid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1xid.htm">LINE_CALLSTATE</A> message for the call. This message indicates that the receiving application has owner privilege to the call (<I>dwParam3</I>). In addition, the number of owners and/or monitors for the call may have changed. This is reported by the <A HREF="msgs_1x0v.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1x0v.htm">LINE_CALLINFO</A> message, and the receiving application can then invoke <A HREF="func1_7iur.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_7iur.htm"><B>lineGetCallStatus</B></A> and <A HREF="func1_96cv.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_96cv.htm"><B>lineGetCallInfo</B></A> to retrieve more information about the received call. </P>
<P>The receiving application should first check the media mode in <A HREF="struc1_4oky.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_4oky.htm"><B>LINECALLINFO</B></A>. If only a single media mode flag is set, the call is officially of that media mode, and the application can act accordingly. If UNKNOWN and other media mode flags are set, then the media mode of the call is officially UNKNOWN but is assumed to be of one of the media modes for which a flag is set in <B>LINECALLINFO</B>. The application should assume that it ought to probe for the highest priority media mode. </P>
<P>If the probe succeeds (either for that media mode or for another one), the application should set the media mode member in <B>LINECALLINFO</B> to the single media mode that was recognized. If the media mode flag matches the <B>LINECALLINFO</B> media mode, the application can act accordingly. If it makes a determination for another media mode, it must first hand off the call to that media mode. </P>
<P>If the probe fails, the application should clear the corresponding media mode flag in <A HREF="struc1_4oky.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_4oky.htm"><B>LINECALLINFO</B></A> and hand off the call, specifying <I>dwMediaMode</I> as LINEMEDIAMODE_UNKNOWN. It should also deallocate its call handle (or revert back to monitoring). </P>
<P>If none of the media modes succeeded in making a determination, only the UNKNOWN flag remains set in the media mode field of <B>LINECALLINFO</B> at the time the media application attempts to hand off the call to UNKNOWN. The final <B>lineHandoff</B> fails if the application is the only remaining owner of the call. This informs the application that it should drop the call and deallocate its handle, in which case the call is abandoned. The privileges of the invoking application to the call are unchanged by this operation, but the application can change its privileges to a call with <A HREF="func2_34px.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_34px.htm"><B>lineSetCallPrivilege</B></A>. </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_74z6.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/tapi3/tapiovr2_74z6.htm'" tppabs="http://msdn.microsoft.com/library/psdk/tapi3/tapiovr2_74z6.htm">Handoffs 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_1pnp.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/quickref_1pnp.htm">Basic Telephony Services Reference</A>, <A HREF="struc1_4oky.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_4oky.htm"><B>LINECALLINFO</B></A>,<B> <A HREF="func1_7iur.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_7iur.htm">lineGetCallStatus</A></B>,<B> <A HREF="func2_34by.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_34by.htm">lineOpen</A></B>, <A HREF="func2_34px.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_34px.htm"><B>lineSetCallPrivilege</B></A>, <A HREF="func2_9691.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_9691.htm"><B>lineSetMediaMode</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 + -