IMbnConnectionProfileManager::GetConnectionProfiles method

Gets a list of connection profiles associated with the device.

Syntax


HRESULT GetConnectionProfiles(
  [in]          IMbnInterface                     *mbnInterface,
  [out, retval] SAFEARRAY(IMbnConnectionProfile*) *connectionProfiles
);

Parameters

mbnInterface [in]

An IMbnInterface that represents the device for which the profile request applies. If this is NULL, the function will return all of the profiles that are present in the system.

connectionProfiles [out, retval]

An array of IMbnConnectionProfile interfaces that represent all the available connection profiles for the device. If this method returns anything other than S_OK, the array pointer is NULL, otherwise the calling application must eventually free the allocated memory by calling SafeArrayDestroy.

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_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_SERVICE_NOT_ACTIVE)

The Mobile Broadband service is not running on this system.

 

Remarks

When this operation is called for a particular device, it returns a list of profiles which have the same subscriber ID as currently reported by device. The GetSubscriberInformation method of IMbnInterface can be used to obtain the subscriber ID associated with the interface.

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.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

None supported

IDL

Mbnapi.idl

See also

IMbnConnectionProfileManager

 

 

Show: