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.

IMbnInterface::GetHomeProvider method

Gets the home provider.

Syntax


HRESULT GetHomeProvider(
  [out, retval] MBN_PROVIDER *homeProvider
);

Parameters

homeProvider [out, retval]

A pointer to an MBN_PROVIDER structure that represents the home provider. If this method returns any value other than S_OK, this parameter is NULL. Upon completion, the calling application must free the memory allocated to the providerID and providerName members of MBN_PROVIDER by calling SysFreeString

Return value

This method can return one of these values.

Return codeDescription
S_OK

The method completed successfully. homeProvider contains valid values.

E_PENDING

The information is not available. The Mobile Broadband service is currently probing to get the home provider. The calling application can get notified when the home provider is available by registering for the OnHomeProviderAvailable method of IMbnInterfaceEvents.

E_MBN_PIN_REQUIRED

The device requires that a PIN must be entered for this operation.

E_MBN_SIM_NOT_INSERTED

The SIM is not inserted.

E_MBN_BAD_SIM

A bad SIM is inserted in the device.

HRESULT_FROM_WIN32(ERROR_READ_FAULT)

Unable to read from the SIM or device memory. For example, the SIM does not have home provider information provisioned.

 

Remarks

GetHomeProvider returns the home provider information for the device. The dataClass field of returned MBN_PROVIDER structure should be ignored.

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 the home provider when the error condition is over. For example, if the device requires a PIN to be entered to retrieve this information, then it will return E_MBN_PIN_REQUIRED. When the application enters the PIN to unlock the device, then the Mobile Broadband service will again try to get this information from the device. The system will update the application about the status of new query by calling the OnHomeProviderAvailable method of IMbnInterfaceEvents.

The registered OnHomeProviderAvailable method of IMbnInterfaceEvents can be either called when home provider information is available or the new query completed with error. Once this function returns success then this information will never change.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

None supported

IDL

Mbnapi.idl

See also

IMbnInterface

 

 

Show: