?? overvw2_3ezy.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>Initialization and Shutdown</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HAID" CONTENT="_tapi2_initialization_and_shutdown">
</HEAD>
<BODY TOPMARGIN="0">
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<!--SYNC_START-->
<script language="JavaScript" src='/library/synch.js'></script>
<!--SYNC_END-->
<H2><A NAME="_tapi2_initialization_and_shutdown"></A>Initialization and Shutdown</H2>
<P>For an application to use any of TAPI's 30 supplementary phone functions, it needs a connection to TAPI, through which it can receive messages. The application establishes this connection using the <A HREF="func2_1tbs.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_1tbs.htm"><B>phoneInitializeEx</B></A> function. In this function, the application specifies the notification mechanism by which TAPI informs the application of changes in the state of the phone and of asynchronous completion of phone functions.</P>
<P>The <B>phoneInitializeEx</B> function returns two pieces of information to the application: an <I>application handle</I>, and the number of phone devices. The application handle represents the application's usage of TAPI. The TAPI functions that use phone handles do not require the application handle, as this handle is derived from the specified phone handle. </P>
<P>The second piece of information returned by <B>phoneInitializeEx</B> is the number of phone devices available to TAPI. Phone devices are identified by their device identifier (<I>device ID</I>). Valid device identifiers range from zero to the number of phone devices minus one. For example, if <B>phoneInitializeEx</B> reports that there are two phone devices in a system, then valid phone device identifiers are 0 and 1. After an application is finished using the phone functions of TAPI, it invokes <A HREF="func2_7b8u.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7b8u.htm"><B>phoneShutdown</B></A>, passing its application handle to shut down its usage of TAPI. This allows TAPI to free any resources assigned to the application. </P>
<P>Applications should not invoke <A HREF="func2_1tbs.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_1tbs.htm"><B>phoneInitializeEx</B></A> without subsequently opening a phone (at least for monitoring). If the application is not monitoring and not using any devices, it should call <B>phoneShutdown</B> so that memory resources allocated by the TAPI dynamic-link library can be released if unneeded, and the library itself can be unloaded from memory while not needed. </P>
<P>Both <B>phoneInitializeEx</B> and <A HREF="func2_7b8u.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7b8u.htm"><B>phoneShutdown</B></A> operate synchronously. That is, these functions either return a success or failure indication, and never return an asynchronous request identifier. </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 + -