?? msgs_3f8l.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>PHONE_STATE</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="PHONE_STATE">
<META NAME="MS-HAID" CONTENT="_tapi2_phone_state">
</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_phone_state"></A>PHONE_STATE</H1>
<P>TAPI sends the PHONE_STATE message to an application whenever the status of a phone device changes. </P>
<PRE class=syntax>PHONE_STATE
hPhone = (HPHONE) hPhoneDevice;
dwCallbackInstance = (DWORD) hCallback;
dwParam1 = (DWORD) PhoneState;
dwParam2 = (DWORD) PhoneStateDetails;
dwParam3 = (DWORD) 0;</PRE>
<H4>Parameters</H4>
<DL>
<DT><I>hPhone</I> </DT>
<DD>A handle to the phone device. </DD>
<DT><I>dwCallbackInstance</I> </DT>
<DD>The application's callback instance provided when opening the phone device. </DD>
<DT><I>dwParam1</I> </DT>
<DD>The phone state that has changed. This parameter uses one of the <A HREF="constnts_3s37.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/constnts_3s37.htm">PHONESTATE_ constants</A>.</DD>
<DT><I>dwParam2</I> </DT>
<DD>Phone state-dependent information detailing the status change. This parameter is not used if multiple flags are set in <I>dwParam1</I>, because multiple status items have changed. The application should invoke <A HREF="func2_7usz.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7usz.htm"><B>phoneGetStatus</B></A> to obtain a complete set of information.
<P>If <I>dwParam1</I> is PHONESTATE_OWNER, <I>dwParam2</I> contains the new number of owners.
<P>If <I>dwParam1</I> is PHONESTATE_MONITORS, <I>dwParam2</I> contains the new number of monitors.
<P>If <I>dwParam1</I> is PHONESTATE_LAMP, <I>dwParam2</I> contains the button/lamp identifier of the lamp that has changed.
<P>If <I>dwParam1</I> is PHONESTATE_RINGMODE, <I>dwParam2</I> contains the new ring mode.
<P>If <I>dwParam1</I> is PHONESTATE_HANDSET, SPEAKER or HEADSET, <I>dwParam2</I> contains the new hookswitch mode of that hookswitch device. This parameter uses one of the <A HREF="constnts_0yyc.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/constnts_0yyc.htm">PHONEHOOKSWITCHMODE_ constants</A>.
</DD>
<DT><I>dwParam3</I> </DT>
<DD>Unused.
</DD>
</DL>
<H4>Return Values</H4>
<P>No return value. </P>
<H4>Remarks</H4>
<P>Sending the PHONE_STATE message to the application can be controlled and queried using <A HREF="func2_2183.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_2183.htm"><B>phoneSetStatusMessages</B></A> and <A HREF="func2_2gmr.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_2gmr.htm"><B>phoneGetStatusMessages</B></A>. By default, this message is disabled for all state changes except for PHONESTATE_REINIT, which cannot be disabled. This message is sent to all applications that have a handle to the phone, including those that called <A HREF="func2_9o6m.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_9o6m.htm"><B>phoneOpen</B></A> with the <I>dwPrivileges</I> parameter set to PHONEPRIVILEGE_OWNER or PHONEPRIVILEGE_MONITOR. </P>
<P>A PHONE_STATE message with an <I>Owners</I> and/or <I>Monitors</I> indication is sent to applications that already have a handle for the phone. This can be the result of another application changing ownership or monitorship of the phone device with <A HREF="func2_9o6m.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_9o6m.htm"><B>phoneOpen</B></A>, <A HREF="func2_2a05.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_2a05.htm"><B>phoneClose</B></A> or <A HREF="func2_7b8u.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7b8u.htm"><B>phoneShutdown</B></A>. </P>
<H4><A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/sdkintro/guide_927n.htm \n\n這個文件不能通過 Teleport Pro 取回, 因?yàn)?地址在一個域或?yàn)樗拈_始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開它嗎?'))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.</P>
<H4>See Also</H4>
<P><A HREF="msgs_6751.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_6751.htm">PHONE_CLOSE</A>, <A HREF="struc2_8rua.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_8rua.htm"><B>PHONECAPS</B></A>, <A HREF="func2_2a05.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_2a05.htm"><B>phoneClose</B></A>, <A HREF="func2_3l6b.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_3l6b.htm"><B>phoneGetDevCaps</B></A>, <A HREF="func2_7usz.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7usz.htm"><B>phoneGetStatus</B></A>, <A HREF="func2_2gmr.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_2gmr.htm"><B>phoneGetStatusMessages</B></A>, <A HREF="func2_36g5.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_36g5.htm"><B>phoneInitialize</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_9o6m.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_9o6m.htm"><B>phoneOpen</B></A>, <A HREF="func2_2183.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_2183.htm"><B>phoneSetStatusMessages</B></A>, <A HREF="func2_7b8u.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7b8u.htm"><B>phoneShutdown</B></A> </P>
<P></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 取回, 因?yàn)?地址在一個域或?yàn)樗拈_始地址設(shè)定的邊界的外部路徑上. \n\n你想從服務(wù)器打開它嗎?'))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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -