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.
Gets the list of visible providers.
HRESULT GetVisibleProviders( ULONG *age, SAFEARRAY **visibleProviders );
A pointer to the time in seconds since the last refresh of the visible provider list from the device.
Pointer to an array of MBN_PROVIDER structures that contains the list of providers for the interface. If this method returns any value other than S_OK, this parameter is NULL. Otherwise, upon completion, the calling program must free the allocated memory by calling SafeArrayDestroy.
This method can return one of these values.
||The method completed successfully. visibleProviders contains valid values. Based on the age of the information, the calling application can decide to issue a new call to ScanNetwork.|
||The information is not available. An active network scan is in progress. The calling application can get notified when the device capabilities are available by registering for the OnScanNetworkComplete method of IMbnInterfaceEvents.|
||Mobile Broadband's cache of the visible network list is invalid. The calling application should call ScanNetwork to populate the cache.|
This method returns the list of currently visible providers. CDMA devices will report only their home provider if any network in their preferred roaming list (PRL) is available.
To avoid frequent network scan operations, the operating system maintains a list of recent scan operations and the provider list is returned from the cached list.
An application can call this method to get a list of visible providers upon the completion of ScanNetwork.
|Minimum supported client||Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||None supported|