IMbnConnection::GetVoiceCallState method

Gets the voice call state of the device.

Syntax


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

Parameters

voiceCallState [out, retval]

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 codeDescription
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

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

None supported

IDL

Mbnapi.idl

See also

IMbnConnection

 

 

Show: