?? func2_36g5.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>phoneInitialize</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="phoneInitialize">
<META NAME="MS-HAID" CONTENT="_tapi2_phoneinitialize">
</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_phoneinitialize"></A>phoneInitialize</H1>
<P>The <B>phoneInitialize</B> function is obsolete. It continues to be exported by tapi.dll and tapi32.dll for backward compatibility with applications using TAPI versions 1.3 and 1.4. </P>
<P>Applications using TAPI version 2.0 or later must use <A HREF="func2_1tbs.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_1tbs.htm"><B>phoneInitializeEx</B></A> instead. </P>
<H2>For TAPI Versions 1.4 and Earlier</H2>
<P>The <B>phoneInitialize</B> function initializes the application's use of TAPI for the subsequent use of the phone functions in the Telephony API. It registers the application's specified notification mechanism and returns the number of phone devices that are available to the application.</P>
<PRE class=syntax><B>LONG WINAPI phoneInitialize(
LPHPHONEAPP</B><I> lphPhoneApp</I><B>, </B>
<B> HINSTANCE</B><I> hInstance</I><B>, </B>
<B> PHONECALLBACK</B><I> lpfnCallback</I><B>, </B>
<B> LPCSTR</B><I> lpszAppName</I><B>, </B>
<B> LPDWORD</B><I> lpdwNumDevs </I>
<B>);</B></PRE>
<H4>Parameters</H4>
<DL>
<DT><I>lphPhoneApp</I></DT>
<DD>A pointer to a location that is filled with the application's usage handle for TAPI.</DD>
<DT><I>hInstance</I></DT>
<DD>The instance handle of the client application or DLL.</DD>
<DT><I>lpfnCallback</I></DT>
<DD>The address of a callback function that is invoked to determine status and events on the phone device.</DD>
<DT><I>lpszAppName</I></DT>
<DD>A pointer to a null-terminated string that contains displayable characters. If this parameter is non-NULL, it contains an application-supplied name of the application. This name is provided in the <A HREF="struc2_3do2.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_3do2.htm"><B>PHONESTATUS</B></A> structure to indicate, in a user-friendly way, which application is the current owner of the phone device. This information can be useful for logging and status reporting purposes. If <I>lpszAppName</I> is NULL, the application's filename is used instead.</DD>
<DT><I>lpdwNumDevs</I></DT>
<DD>A pointer to <B>DWORD</B>. This location is loaded with the number of phone devices available to the application.
</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>PHONEERR_INVALAPPNAME, PHONEERR_INIFILECORRUPT, PHONEERR_INVALPOINTER, PHONEERR_NOMEM, PHONEERR_OPERATIONFAILED, PHONEERR_REINIT, PHONEERR_RESOURCEUNAVAIL, PHONEERR_NODEVICE, PHONEERR_NODRIVER, PHONEERR_INVALPARAM</P>
<H4>Remarks</H4>
<P>The application can refer to individual phone devices by using phone device identifiers that range from zero to <I>dwNumDevs</I> minus one. An application should not assume that these phone devices are capable of anything beyond what is specified by the Assisted Telephony subset without first querying their device capabilities with the <A HREF="func2_3l6b.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_3l6b.htm"><B>phoneGetDevCaps</B></A><B> </B>function.</P>
<P>Applications should not invoke <B>phoneInitialize</B> without subsequently opening a phone (at least for monitoring). If the application is not monitoring and not using any devices, it should call <A HREF="func2_7b8u.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7b8u.htm"><B>phoneShutdown</B></A> so that memory resources allocated by TAPI can be released if unneeded, and TAPI itself can be unloaded from memory while not needed. </P>
<P>Another reason for performing a <B>phoneShutdown</B> is that if a user changes the device configuration (adds or removes a line or phone), there is no way for TAPI to notify an application that has a line or phone handle open at the time. After a reconfiguration has taken place, causing a PHONESTATE_REINIT message to be sent, no applications can open a device until all applications have performed a <B>phoneShutdown</B>.</P>
<P>If any service provider fails to initialize properly, the <B>phoneInitialize</B> function fails and returns the error indicated by the service provider. If the PHONEERR_INVALPARAM error value is returned, the specified <I>hInstance</I> parameter is invalid.</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>Unsupported.<BR>
<B> Windows 95/98: </B>Requires Windows 95 only.<BR>
<B> Version: </B>Requires TAPI 1.4 or earlier.<BR>
<B> Header: </B>Declared in Tapi.h.<BR>
<B> Library: </B>Use Tapi32.lib.</P>
<H4>See Also</H4>
<P><A HREF="func2_3l6b.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_3l6b.htm"><B>phoneGetDevCaps</B></A>, <A HREF="func2_1tbs.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_1tbs.htm"><B>phoneInitializeEx</B></A>, <A HREF="func2_7b8u.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7b8u.htm"><B>phoneShutdown</B></A>, <A HREF="struc2_3do2.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_3do2.htm"><B>PHONESTATUS</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 + -