?? func2_4bzg.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>lineSetMediaControl</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="lineSetMediaControl">
<META NAME="MS-HAID" CONTENT="_tapi2_linesetmediacontrol">
</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_linesetmediacontrol"></A>lineSetMediaControl</H1>
<P>The <B>lineSetMediaControl</B> function enables and disables control actions on the media stream associated with the specified line, address, or call. Media control actions can be triggered by the detection of specified digits, media types, custom tones, and call states. </P>
<PRE class=syntax><B>LONG WINAPI lineSetMediaControl(
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> LPLINEMEDIACONTROLDIGIT const</B><I> lpDigitList</I><B>, </B>
<B> DWORD</B><I> dwDigitNumEntries</I><B>, </B>
<B> LPLINEMEDIACONTROLMEDIA const</B><I> lpMediaList</I><B>, </B>
<B> DWORD</B><I> dwMediaNumEntries</I><B>, </B>
<B> LPLINEMEDIACONTROLTONE const</B><I> lpToneList</I><B>, </B>
<B> DWORD</B><I> dwToneNumEntries</I><B>, </B>
<B> LPLINEMEDIACONTROLCALLSTATE const</B><I> lpCallStateList</I><B>, </B>
<B> DWORD</B><I> dwCallStateNumEntries </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 identifier 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 application must be an owner of the call. The call state of <I>hCall</I> can be any state. </DD>
<DT><I>dwSelect</I> </DT>
<DD>Specifies whether the media control requested is associated with a single call, is the default for all calls on an address, or is the default for all calls on a line. This parameter one and only 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>lpDigitList</I> </DT>
<DD>A pointer to the array that contains the digits that are to trigger media control actions, of type <A HREF="struc2_175e.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_175e.htm"><B>LINEMEDIACONTROLDIGIT</B></A>. Each time a digit in the digit list is detected, the specified media control action is carried out on the call's media stream.
<P>Valid digits for pulse mode are '0' through '9'. Valid digits for DTMF mode are '0' through '9', 'A', 'B', 'C', 'D', '*', '#'.
</DD>
<DT><I>dwDigitNumEntries</I> </DT>
<DD>The number of entries in the <I>lpDigitList</I>. </DD>
<DT><I>lpMediaList</I> </DT>
<DD>A pointer to an array with entries of type <A HREF="struc2_4zn6.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_4zn6.htm"><B>LINEMEDIACONTROLMEDIA</B></A>. The array has <I>dwMediaNumEntries</I> entries. Each entry contains a media type to be monitored, media-type specific information (such as duration), and a media control field. If a media type in the list is detected, the corresponding media control action is performed on the call's media stream. </DD>
<DT><I>dwMediaNumEntries</I> </DT>
<DD>The number of entries in <I>lpMediaList</I>. </DD>
<DT><I>lpToneList</I> </DT>
<DD>A pointer to an array with entries of type <A HREF="struc2_2fzm.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_2fzm.htm"><B>LINEMEDIACONTROLTONE</B></A>. The array has <I>dwToneNumEntries</I> entries. Each entry contains a description of a tone to be monitored, duration of the tone, and a media-control field. If a tone in the list is detected, the corresponding media control action is performed on the call's media stream. </DD>
<DT><I>dwToneNumEntries</I> </DT>
<DD>The number of entries in <I>lpToneList</I>. </DD>
<DT><I>lpCallStateList</I> </DT>
<DD>A pointer to an array with entries of type <A HREF="struc2_556a.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_556a.htm"><B>LINEMEDIACONTROLCALLSTATE</B></A>. The array has <I>dwCallStateNumEntries</I> entries. Each entry contains a call state and a media control action. Whenever the given call transitions into one of the call states in the list, the corresponding media control action is invoked. </DD>
<DT><I>dwCallStateNumEntries</I> </DT>
<DD>The number of entries in <I>lpCallStateList</I>.
</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_INVALADDRESSID, LINEERR_NOMEM, LINEERR_INVALCALLHANDLE, LINEERR_NOTOWNER, LINEERR_INVALCALLSELECT, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALCALLSTATELIST, LINEERR_OPERATIONFAILED, LINEERR_INVALDIGITLIST, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALLINEHANDLE, LINEERR_UNINITIALIZED, LINEERR_INVALMEDIALIST, LINEERR_INVALPOINTER, LINEERR_INVALTONELIST.</P>
<H4>Remarks</H4>
<P>The <B>lineSetMediaControl</B> function is considered successful if media control has been correctly initiated, not when any media control has taken effect. Media control in progress is changed or is canceled by calling this function again with either different parameters or NULLs. If one or more of the parameters <I>lpDigitList</I>, <I>lpMediaList</I>, <I>lpToneList,</I> and <I>lpCallStateList</I> are NULL, then the corresponding digit, media type, tone, or call state-triggered media control is disabled. To modify just a portion of the media control parameters while leaving the remaining settings in effect, the application should invoke <B>lineSetMediaControl</B>, supplying the previous parameters for those portions that must remain in effect and new parameters for those parts that are to be modified. </P>
<P>If <I>hCall</I> is selected and the call terminates or the application deallocates its handle, media control on that call is canceled. </P>
<P>All applications that are owners of the call are in principle allowed to make media control requests on the call. Only a single media control request can be outstanding on a call across all applications that own the call. Each time <B>lineSetMediaControl</B> is called, the new request overrides any media control then in effect on the call, whether set by the calling application or any other owning application. </P>
<P>Depending on the service provider and other activities that compete for such resources, the number of simultaneous detections that can be made can vary over time. If service provider resources are overcommitted, the LINEERR_RESOURCEUNAVAIL error is returned. </P>
<P>Whether or not media control is supported by the service provider is a device capability. </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="struc2_556a.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_556a.htm"><B>LINEMEDIACONTROLCALLSTATE</B></A>, <A HREF="struc2_175e.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_175e.htm"><B>LINEMEDIACONTROLDIGIT</B></A>, <A HREF="struc2_4zn6.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_4zn6.htm"><B>LINEMEDIACONTROLMEDIA</B></A>, <A HREF="struc2_2fzm.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_2fzm.htm"><B>LINEMEDIACONTROLTONE</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 + -