IMbnConnectionProfileManager::GetConnectionProfile method

Gets a specific connection profile associated with the given Mobile Broadband device.


HRESULT GetConnectionProfile(
  [in]          IMbnInterface         *mbnInterface,
  [in]          LPCWSTR               profileName,
  [out, retval] IMbnConnectionProfile **connectionProfile


mbnInterface [in]

An IMbnInterface that represents the device for which the profile request applies. If mbnInterface is NULL, then this function will return the profile of the given name associated with any device in the system.

profileName [in]

A null-terminated string that contains the name of the connection profile.

connectionProfile [out, retval]

An IMbnConnectionProfile interface that represents the desired connection profile. If this method returns anything other than S_OK, this is NULL.

Return value

This method can return one of these values.

Return codeDescription

The method completed successfully.


The interface is invalid, most likely because the Mobile Broadband device has been removed from the system.


A profile with the given name does not exist.


The device is not ready. Unable to obtain the subscriber ID because the device is not MBN_READY_STATE_INITIALIZED.


A profile with the given name does not exist.



A connection profile is associated with the subscriber ID of the device. For GSM devices the subscriber ID is the International Mobile Subscriber Identity (IMSI) of the SIM. For CDMA devices it is the Mobile Identification Number (MIN) string or the International Roaming MIN (IRM) string.

If a new profile has been created using CreateConnectionProfile, then the caller must wait for the OnConnectionProfileArrival event to be received before calling GetConnectionProfile with the new profile's name; otherwise, the GetConnectionProfile API call may fail with HRESULT_FROM_WIN32(ERROR_NOT_FOUND).


Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

None supported



See also