Compartilhar via


PHONE_STATE (TSPI) (Compact 2013)

3/26/2014

This message is sent to the PHONEEVENT callback 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_phoneGetStatus to obtain a complete set of information. If dwParam1 is PHONESTATE_LAMP, dwParam2 contains the button/lamp identifier of the lamp that has changed. If dwParam1 is PHONESTATE_RINGMODE, dwParam2 contains the new ring mode. If dwParam1 is PHONESTATE_HANDSETHOOKSWITCH, PHONESTATE_SPEAKERHOOKSWITCH or PHONESTATE_HEADSETHOOKSWITCH, dwParam2 contains 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

tspi.h

See Also

Reference

TSPI Messages
PHONEEVENT
TSPI_phoneGetStatus
TSPI_phoneSetStatusMessages