?? func1_2o54.htm
字號(hào):
<DD>A pointer to a <B>DWORD</B>-sized location. The application must initialize this <B>DWORD</B>, before calling this function, to the highest API version it is designed to support (for example, the same value it would pass into <I>dwAPIHighVersion</I> parameter of <A HREF="func2_9kxa.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_9kxa.htm"><B>lineNegotiateAPIVersion</B></A>). Artificially high values must not be used; the value must be accurately set. TAPI translates any newer messages or structures into values or formats supported by the application's version. Upon successful completion of this request, this location is filled with the highest API version supported by TAPI, thereby allowing the application to detect and adapt to having been installed on a system with a different version of TAPI. </DD>
<DT><I>lpLineInitializeExParams</I> </DT>
<DD>A pointer to a structure of type <A HREF="struc2_6smq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_6smq.htm"><B>LINEINITIALIZEEXPARAMS</B></A> containing additional parameters used to establish the association between the application and TAPI (specifically, the application's selected event notification mechanism and associated parameters).
</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_INVALAPPNAME, LINEERR_OPERATIONFAILED, LINEERR_INIFILECORRUPT, LINEERR_INVALPOINTER, LINEERR_REINIT, LINEERR_NOMEM, LINEERR_INVALPARAM.</P>
<H4>Remarks</H4>
<P>Applications must select one of three mechanisms by which TAPI notifies the application of telephony events: Hidden Window, Event Handle, or Completion Port. </P>
<P>The Hidden Window mechanism is selected by specifying LINEINITIALIZEEXOPTION_USEHIDDENWINDOW in the <B>dwOptions</B> member in the <A HREF="struc2_6smq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_6smq.htm"><B>LINEINITIALIZEEXPARAMS</B></A> structure. In this mechanism (which is the only mechanism available to TAPI verson 1.<I>x</I> applications), TAPI creates a window in the context of the application during the <B>lineInitializeEx</B> or <A HREF="func1_26lh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_26lh.htm"><B>lineInitialize</B></A> (for TAPI version 1.3 and 1.4 applications) function, and subclasses the window so that all messages posted to it are handled by a WNDPROC in TAPI itself. When TAPI has a message to deliver to the application, TAPI posts a message to the hidden window. When the message is received (which can happen only when the application calls the Windows <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winui/messques_10kl.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winui/messques_10kl.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winui/messques_10kl.htm"><B>GetMessage</B></A> function), Windows switches the process context to that of the application and invokes the WNDPROC in TAPI. TAPI then delivers the message to the application by calling the <B>lineCallbackProc</B>, a pointer to which the application provided as a parameter in its call to <B>lineInitializeEx</B> (or <A HREF="func1_26lh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_26lh.htm"><B>lineInitialize</B></A>). This mechanism requires the application to have a message queue (which is not desirable for service processes) and to service that queue regularly to avoid delaying processing of telephony events. The hidden window is destroyed by TAPI during the <A HREF="func2_7sq6.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7sq6.htm"><B>lineShutdown</B></A> function. </P>
<P>The Event Handle mechanism is selected by specifying LINEINITIALIZEEXOPTION_USEEVENT in the <B>dwOptions</B> member in the <A HREF="struc2_6smq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_6smq.htm"><B>LINEINITIALIZEEXPARAMS</B></A> structure. In this mechanism, TAPI creates an event object on behalf of the application, and returns a handle to the object in the <B>hEvent</B> member in <A HREF="struc2_6smq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_6smq.htm"><B>LINEINITIALIZEEXPARAMS</B></A>. The application must not manipulate this event in any manner (for example, must not call <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/synchro_8ut0.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/synchro_8ut0.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/synchro_8ut0.htm"><B>SetEvent</B></A>, <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/synchro_4f78.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/synchro_4f78.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/synchro_4f78.htm"><B>ResetEvent</B></A>, <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/handobj_289x.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/handobj_289x.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/handobj_289x.htm"><B>CloseHandle</B></A>, and so on) or undefined behavior results; the application can only wait on this event using functions such as <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/synchro_4ldg.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/synchro_4ldg.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/synchro_4ldg.htm"><B>WaitForSingleObject</B></A> or <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/synchro_2esz.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/synchro_2esz.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/synchro_2esz.htm"><B>MsgWaitForMultipleObjects</B></A>. TAPI signals this event whenever a telephony event notification is pending for the application; the application must call <A HREF="func1_5lid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_5lid.htm"><B>lineGetMessage</B></A> to fetch the contents of the message. The event is reset by TAPI when no events are pending. The event handle is closed and the event object destroyed by TAPI during the <A HREF="func2_7sq6.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7sq6.htm"><B>lineShutdown</B></A> function. The application is not required to wait on the event handle that is created; the application could choose instead to call <B>lineGetMessage</B> and have it block waiting for a message to be queued. </P>
<P>The Completion Port mechanism is selected by specifying LINEINITIALIZEEXOPTION_USECOMPLETION PORT in the <B>dwOptions</B> member in the <A HREF="struc2_6smq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_6smq.htm"><B>LINEINITIALIZEEXPARAMS</B></A> structure. In this mechanism, whenever a telephony event needs to be sent to the application, TAPI sends it using <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/filesio_33g3.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/filesio_33g3.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/filesio_33g3.htm"><B>PostQueuedCompletionStatus</B></A> to the completion port that the application specified in the <B>hCompletionPort</B> member in <B>LINEINITIALIZEEXPARAMS</B>, tagged with the completion key that the application specified in the <B>dwCompletionKey</B> member in <B>LINEINITIALIZEEXPARAMS</B>. The application must have previously created the completion port using <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/filesio_4k1g.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/filesio_4k1g.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/filesio_4k1g.htm"><B>CreateIoCompletionPort</B></A>. The application retrieves events using <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/filesio_071v.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/filesio_071v.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/filesio_071v.htm"><B>GetQueuedCompletionStatus</B></A>. Upon return from <B>GetQueuedCompletionStatus</B>, the application has the specified <B>dwCompletionKey</B> written to the <B>DWORD</B> pointed to by the <I>lpCompletionKey</I> parameter, and a pointer to a <A HREF="struc2_5xwy.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_5xwy.htm"><B>LINEMESSAGE</B></A> structure returned to the location pointed to by <I>lpOverlapped</I>. After the application has processed the event, it is the application's responsibility to call <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/winbase/memman_2339.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/winbase/memman_2339.htm'" tppabs="http://msdn.microsoft.com/library/psdk/winbase/memman_2339.htm"><B>LocalFree</B></A> to release the memory used to contain the <B>LINEMESSAGE</B> structure. Because the application created the completion port (thereby allowing it to be shared for other purposes), the application must close it; the application must not close the completion port until after calling <A HREF="func2_7sq6.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7sq6.htm"><B>lineShutdown</B></A>. </P>
<P>When a multithreaded application is using the Event Handle mechanism and more than one thread is waiting on the handle, or the Completion Port notification mechanism and more than one thread is waiting on the port, it is possible for telephony events to be processed out of sequence. This is not due to the sequence of delivery of events from TAPI, but would be caused by the time slicing of threads or the execution of threads on separate processors. </P>
<P>If LINEERR_REINIT is returned and TAPI reinitialization has been requested, for example as a result of adding or removing a telephony service provider, then <B>lineInitializeEx</B> requests are rejected with this error until the last application shuts down its usage of the API (using <A HREF="func2_7sq6.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7sq6.htm"><B>lineShutdown</B></A>), at which time the new configuration becomes effective and applications are once again permitted to call <B>lineInitializeEx</B>. </P>
<P>If the LINEERR_INVALPARAM error value is returned, the specified <I>hInstance</I> parameter is invalid. </P>
<P>The application can refer to individual line devices by using line device identifiers that range from zero to <I>dwNumDevs</I> minus one. An application should not assume that these line devices are capable of any particular TAPI function without first querying their device capabilities by <A HREF="func1_2lbn.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2lbn.htm"><B>lineGetDevCaps</B></A> and <A HREF="func1_533n.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_533n.htm"><B>lineGetAddressCaps</B></A>. </P>
<H4><A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/sdkintro/guide_927n.htm \n\n這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))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 2.0 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="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="func1_31lv.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_31lv.htm"><B>lineCallbackFunc</B></A>, <A HREF="struc1_4oky.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_4oky.htm"><B>LINECALLINFO</B></A>, <A HREF="func1_533n.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_533n.htm"><B>lineGetAddressCaps</B></A>, <A HREF="func1_2lbn.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2lbn.htm"><B>lineGetDevCaps</B></A>, <A HREF="func1_5lid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_5lid.htm"><B>lineGetMessage</B></A>, <A HREF="func1_26lh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_26lh.htm"><B>lineInitialize</B></A>, <A HREF="struc2_6smq.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_6smq.htm"><B>LINEINITIALIZEEXPARAMS</B></A>, <A HREF="struc2_5xwy.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_5xwy.htm"><B>LINEMESSAGE</B></A>, <A HREF="func2_9kxa.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_9kxa.htm"><B>lineNegotiateAPIVersion</B></A>, <A HREF="func2_7sq6.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7sq6.htm"><B>lineShutdown</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這個(gè)文件不能通過(guò) Teleport Pro 取回, 因?yàn)?地址在一個(gè)域或?yàn)樗拈_(kāi)始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開(kāi)它嗎?'))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>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -