IMbnConnectionProfileManager::GetConnectionProfile method

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

Syntax


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

Parameters

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
S_OK

The method completed successfully.

E_HANDLE

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

HRESULT_FROM_WIN32(ERROR_NOT_FOUND)

A profile with the given name does not exist.

HRESULT_FROM_WIN32(ERROR_NOT_READY)

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

HRESULT_FROM_WIN32(ERROR_NOT_FOUND)

A profile with the given name does not exist.

 

Remarks

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).

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

None supported

IDL

Mbnapi.idl

See also

IMbnConnectionProfileManager

 

 

Community Additions

ADD
Show:
© 2014 Microsoft