IMbnInterface::GetReadyState 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 ready state.

Syntax

HRESULT GetReadyState(
  [out, retval] MBN_READY_STATE *readyState
);

Parameters

[out, retval] readyState

A pointer to an MBN_READY_STATE structure. If this method returns any value other than S_OK, this parameter is NULL.

Return value

This method can return one of these values.

Return code Description
S_OK
The method completed successfully. readyState contains valid values.
E_PENDING
The information is not available. The Mobile Broadband service is currently probing for the ready state. The calling application can get notified when the ready state is available by registering for the OnReadyStateChange method of IMbnInterfaceEvents.

Remarks

The ready state specifies whether the interface is successfully initialized and is ready to perform connection operations. For SIM-based devices, a device is ready when the SIM has been initialized successfully by the device. The device can be used for connection only when the ready state is MBN_READY_STATE_INITIALIZED. For more information about other device states, see MBN_READY_STATE.

The ready state of an interface can change as a result of a user operation. For example, when a user inserts a SIM into a device, the ready state changes from MBN_READY_STATE_SIM_NOT_INSERTED to another ready state. The ready state can also change because of other operations performed by the application. For example, when a PIN has been entered, the ready state can change from MBN_READY_STATE_DEVICE_LOCKED to another ready state. An application can register for event notifications whenever there is a change in the ready state of the interface. The OnReadyStateChange member of IMbnInterfaceEvents is called to notify an application about any change in the ready state.

The device's SMS subsystem may not be ready when it reports MBN_READY_STATE_INITIALIZED. A calling application should wait for a call to the OnSmsConfigurationChange member of IMbnSmsEvents, indicating that the SMS subsystem is ready.

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

IMbnInterface