Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This message is sent to the PHONEEVENTcallback function to TAPI whenever a phone device's status changes.

Syntax

PHONE_STATE

htPhone = (HTAPIPHONE) 
hPhoneDevice;

dwMsg = (DWORD) PHONE_STATE;

dwParam1 = (DWORD) 
PhoneState;

dwParam2 = (DWORD) 
PhoneStateData;

dwParam3 = (DWORD) 0;

Parameters

htPhone

The TAPI opaque object handle to the phone device.

dwMsg

The value PHONE_STATE.

dwParam1

The phone state that has changed. This parameter uses the PHONESTATE_ constants.

dwParam2

Phone-state dependent information detailing the status change. This parameter is not used if multiple flags are set in dwParam1, because multiple status items have changed. TAPI should invoke TSPI_phoneGetStatusto obtain a complete set of information. If dwParam1is PHONESTATE_LAMP, dwParam2contains the button/lamp identifier of the lamp that has changed. If dwParam1is PHONESTATE_RINGMODE, dwParam2contains the new ring mode. If dwParam1is PHONESTATE_HANDSETHOOKSWITCH, PHONESTATE_SPEAKERHOOKSWITCH or PHONESTATE_HEADSETHOOKSWITCH, dwParam2contains the new hookswitch mode of that hookswitch device, which can be set to any of the PHONEHOOKSWITCHMODE_ constants.

dwParam3

Not used.

Remarks

The sending of this message is controlled by TSPI_phoneSetStatusMessages. By default, this message is disabled for all state changes.

The service provider never reports changed values for PHONESTATE_OWNER or PHONESTATE_MONITORS, because the notion of privilege does not appear at the TSPI level.

For backward compatibility, older service providers are not expected to generate this value in a PHONE_STATE message. If they do, the message is handled in the same manner as for newer service providers (as described earlier).

Requirements

Header tapi.h
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also