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::SetPreferredProviders method

Updates the preferred providers list for the device.

Syntax


HRESULT SetPreferredProviders(
  [in]  SAFEARRAY(MBN_PROVIDER) preferredProviders,
  [out] ULONG                   *requestID
);

Parameters

preferredProviders [in]

An array of MBN_PROVIDER structures that contains the list of preferred providers.

requestID [out]

Pointer to the request ID set by the operating system for this request. The asynchronous response will contain this same requestID.

Return value

This method can return one of these values.

Return codeDescription
S_OK

The method completed successfully.

HRESULT_FROM_WIN32(ERROR_SERVICE_NOT_ACTIVE)

The Mobile Broadband service is not running on this system.

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)

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

 

Remarks

The SetPreferredProviders method initiates an update of the preferred provider list for the interface. This is an asynchronous operation, and the method call returns immediately. If this method returns successfully (with S_OK), then the operating system will notify the calling application about the completion status of this operation by calling the OnSetPreferredProvidersComplete method of IMbnInterfaceEvents.

If the device is removed from the system before this operation is complete, then there is no guarantee that the completion notification will be received by the calling application.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

None supported

IDL

Mbnapi.idl

See also

IMbnInterface

 

 

Show: