Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMbnRegistration::GetProviderName method

Gets the provider name for the currently registered network.

Syntax


HRESULT GetProviderName(
  [out] BSTR *providerName
);

Parameters

providerName [out]

Pointer to a string that contains the name of the currently registered provider. The maximum length of this string is MBN_PROVIDERNAME_LEN characters. The string is filled only when the method returns S_OK for success. Upon success, the calling application must free the allocated memory by calling SysFreeString.

Return value

This method can return one of these values.

Return codeDescription
S_OK

The operation was successful.

E_PENDING

The provider name is not available. The Mobile Broadband service is currently probing the device for the information. When the provider name is available, the Mobile Broadband service will call the OnRegisterModeAvailable method of IMbnRegistrationEvents.

E_MBN_PIN_REQUIRED

A PIN is required to get the provider name.

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

The provider name may change when the Mobile Broadband device moves from one network to another. This includes whenever there is change from MBN_REGISTER_STATE_HOME to MBN_REGISTER_STATE_SEARCHING in the network registration state. This also occurs when there is a change in the registered network, such as when a network changes its registration from one provider to another. After such changes, the Mobile Broadband service will call the OnRegisterStateChange method of IMbnRegistrationEvents. When this happens, the application should call GetProviderID.

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

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

None supported

IDL

Mbnapi.idl

See also

IMbnRegistration

 

 

Show:
© 2017 Microsoft