ITPhone::get_HookSwitchState method (tapi3if.h)

The get_HookSwitchState method retrieves the current hookswitch state for a particular hookswitch device on the phone.

The application must call ITPhone::Open before invoking this method; otherwise, the invocation fails.

Syntax

HRESULT get_HookSwitchState(
  [in]  PHONE_HOOK_SWITCH_DEVICE HookSwitchDevice,
  [out] PHONE_HOOK_SWITCH_STATE  *pHookSwitchState
);

Parameters

[in] HookSwitchDevice

The PHONE_HOOK_SWITCH_DEVICE descriptor for the hookswitch type.

[out] pHookSwitchState

The PHONE_HOOK_SWITCH_STATE descriptor for the hookswitch status.

Return value

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

Requirements

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

See also

ITPhone

put_HookSwitchState