Starting in Windows 10, version 1803, the Win32 APIs described in this section are replaced by the Windows Runtime APIs in the Windows.Networking.Connectivity namespace.
Updates the preferred providers list for the device.
HRESULT SetPreferredProviders( SAFEARRAY *preferredProviders, ULONG *requestID );
An array of MBN_PROVIDER structures that contains the list of preferred providers.
Pointer to the request ID set by the operating system for this request. The asynchronous response will contain this same requestID.
This method can return one of these values.
||The method completed successfully.|
||The Mobile Broadband service is not running on this system.|
||The interface is invalid, most likely because the Mobile Broadband device has been removed from the system.|
||The interface is invalid. Most likely because the Mobile Broadband device has been removed from the system.|
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.
|Minimum supported client||Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||None supported|