ITPhoneEvent::get_ButtonState method (tapi3if.h)

The get_ButtonState method returns a PHONE_BUTTON_STATE value specifying the state to which the button has transitioned. This information is available only when the ITPhoneEvent::get_Event method returns PE_BUTTON.

Syntax

HRESULT get_ButtonState(
  [out] PHONE_BUTTON_STATE *pState
);

Parameters

[out] pState

Pointer to the PHONE_BUTTON_STATE descriptor of the button's current state.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method is available because some buttons do not support the PBS_DOWN button state, but instead momentarily report PBS_PRESSED. Additionally, the application can miss the button press on phones that do support PBS_DOWN if the button is pressed only for a short time and the call to the ITPhone::get_ButtonState method does not execute quickly enough.

Requirements

Requirement Value
Target Platform Windows
Header tapi3if.h (include Tapi3.h)
Library Uuid.lib
DLL Tapi3.dll

See also

ITPhoneEvent

ITPhoneEvent::get_Event