IMbnConnection::GetVoiceCallState method (mbnapi.h)

Important

Starting in Windows 10, version 1803, the Win32 APIs described in this section are replaced by the Windows Runtime APIs in the Windows.Networking.Connectivity namespace.

Gets the voice call state of the device.

Syntax

HRESULT GetVoiceCallState(
  [out, retval] MBN_VOICE_CALL_STATE *voiceCallState
);

Parameters

[out, retval] voiceCallState

A pointer to a MBN_VOICE_CALL_STATE value that specifies the voice call state. If the method returns anything other than S_OK, the contents of this pointer are not set.

Return value

This method can return one of these values.

Return code Description
S_OK
The method completed successfully.
E_PENDING
The call state not available. The Mobile Broadband service is probing the device for the information. The calling application can be notified when the call state is available by registering for the OnVoiceCallStateChange method of IMbnConnectionEvents.
E_MBN_PIN_REQUIRED
A PIN is required to get the call state.
E_MBN_SIM_NOT_INSERTED
A SIM is not inserted in the device.
E_MBN_BAD_SIM
A bad SIM is inserted in the device.

Remarks

For the recoverable errors E_MBN_PIN_REQUIRED, E_MBN_SIM_NOT_INSERTED, and E_MBN_BAD_SIM, the Mobile Broadband service will query the device again for this information once the error condition is over. For example, if the device required a PIN to be entered to retrieve the voice call state, then E_MBN_PIN_REQUIRED is returned. After the calling application enters the PIN to unlock the device, the Mobile Broadband service will again try to get the voice call state from the device. The Mobile Broadband service will update the application with the status of a new probe by calling the OnVoiceCallStateChange method of IMbnConnectionEvents.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server None supported
Target Platform Windows
Header mbnapi.h

See also

IMbnConnection