?? func2_0vn0.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>lineSetTerminal</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="lineSetTerminal">
<META NAME="MS-HAID" CONTENT="_tapi2_linesetterminal">
</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_linesetterminal"></A>lineSetTerminal</H1>
<P>The <B>lineSetTerminal</B> function enables an application to specify which terminal information related to the specified line, address, or call is to be routed. The <B>lineSetTerminal</B> function can be used while calls are in progress on the line to allow an application to route these events to different devices as required. </P>
<PRE class=syntax><B>LONG WINAPI lineSetTerminal(
HLINE</B><I> hLine</I><B>, </B>
<B> DWORD</B><I> dwAddressID</I><B>, </B>
<B> HCALL</B><I> hCall</I><B>, </B>
<B> DWORD</B><I> dwSelect</I><B>, </B>
<B> DWORD</B><I> dwTerminalModes</I><B>, </B>
<B> DWORD</B><I> dwTerminalID</I><B>, </B>
<B> DWORD</B><I> bEnable </I>
<B>);</B></PRE>
<H4>Parameters</H4>
<DL>
<DT><I>hLine</I> </DT>
<DD>A handle to an open line device. </DD>
<DT><I>dwAddressID</I> </DT>
<DD>An address on the given open line device. An address identifier is permanently associated with an address; the identifier remains constant across operating system upgrades.</DD>
<DT><I>hCall</I> </DT>
<DD>A handle to a call. The call state of <I>hCall</I> can be any state, if <I>dwSelect</I> is CALL. </DD>
<DT><I>dwSelect</I> </DT>
<DD>Specifies whether the terminal setting is requested for the line, the address, or just the specified call. If line or address is specified, events either apply to the line or address itself or serve as a default initial setting for all new calls on the line or address. This parameter uses one of the <A HREF="constnts_9ylv.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/constnts_9ylv.htm">LINECALLSELECT_ Constants</A>. </DD>
<DT><I>dwTerminalModes</I> </DT>
<DD>The class or classes of low-level events to be routed to the given terminal. This parameter uses one or more of the <A HREF="constnts_9vub.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/constnts_9vub.htm">LINETERMMODE_ Constants</A>.</DD>
<DT><I>dwTerminalID</I> </DT>
<DD>The device identifier of the terminal device where the given events are to be routed. Terminal identifiers are small integers in the range of zero to one less than <B>dwNumTerminals</B>, where <B>dwNumTerminals</B>, and the terminal modes each terminal is capable of handling, are returned by <A HREF="func1_2lbn.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2lbn.htm"><B>lineGetDevCaps</B></A>.
<P class=note><B>Note</B> These terminal identifiers have no relation to other device identifiers and are defined by the service provider using device capabilities.
</DD>
<DT><I>bEnable</I> </DT>
<DD>If TRUE, <I>dwTerminalID</I> is valid and the specified event classes are routed to or from that terminal. If FALSE, these events are not routed to or from the terminal device with identifier equal to <I>dwTerminalID</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_INVALADDRESSID, LINEERR_NOMEM, LINEERR_INVALCALLHANDLE, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALCALLSELECT, LINEERR_OPERATIONFAILED, LINEERR_INVALLINEHANDLE, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALTERMINALID, LINEERR_UNINITIALIZED, LINEERR_INVALTERMINALMODE. </P>
<H4>Remarks</H4>
<P>An application can use this function to route certain classes of low-level line events to the specified terminal device or to suppress the routing of these events. For example, voice can be routed to an audio I/O device (headset), lamps and display events can be routed to the local phone device, and button events and ringer events can be suppressed altogether. </P>
<P>This function can be called at any time, even when a call is active on the given line device. This allows a user to switch from using the local phone set to another audio I/O device. This function can be called multiple times to route the same events to multiple terminals simultaneously. To reroute events to a different terminal, the application should first disable routing to the existing terminal and then route the events to the new terminal. </P>
<P>Terminal identifier assignments are made by the line's service provider. Device capabilities indicate only which terminal identifiers the service provider has available. Service providers that do not support this type of event routing would indicate that they have no terminal devices (<B>dwNumTerminals</B> in <A HREF="struc2_67aq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_67aq.htm"><B>LINEDEVCAPS</B></A> would be zero). </P>
<P>Invoking <B>lineSetTerminal</B> on a line or address affects all existing calls on that line or address, but does not affect calls on other addresses. It also sets the default for future calls on that line or address. A line or address that has multiple connected calls active at one time can have different routing in effect for each call. </P>
<P>Disabling the routing of low-level events to a terminal when these events are not currently routed to or from that terminal does not necessarily generate an error so long as the function succeeds (the specified events are not routed to or from that terminal). </P>
<P>TAPI routes call progress tones and messages to the same location as set by the <B>lineSetTerminal</B> function for "media". For example, if audio signals are going to the phone, then so will busy signals (analog) or Q.931 messages indicating busy (digital). </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_6gvn.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/quickref_6gvn.htm">Supplementary Line Service Functions</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>, <A HREF="func1_2lbn.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2lbn.htm"><B>lineGetDevCaps</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 + -