IMbnRegistration::GetRegisterMode 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 network registration mode of a Mobile Broadband device.

Syntax

HRESULT GetRegisterMode(
  [out] MBN_REGISTER_MODE *registerMode
);

Parameters

[out] registerMode

A pointer to a MBN_REGISTER_MODE value that specifies the current network registration mode of the device. The value is meaningful only if the method returns S_OK.

Return value

This method can return one of these values.

Return code Description
S_OK
The operation was successful.
E_PENDING
The registration mode is not available. The Mobile Broadband service is currently probing the device for the information. When the registration mode is available, the Mobile Broadband service will call the OnRegisterModeAvailable method of IMbnRegistrationEvents.
E_MBN_PIN_REQUIRED
A PIN is required to get the register mode.
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

See MBN_REGISTER_MODE for details on possible registration modes.

For recoverable error E_MBN_PIN_REQUIRED, the Mobile Broadband service will again try to fetch this information from the device when the error condition is over (when a PIN is entered). Then the Mobile Broadband service will call the OnRegisterModeAvailable method of IMbnRegistrationEvents.

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

IMbnRegistration