Hardware Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
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::ScanNetwork method

Asynchronously scans the network to get a list of visible providers.

Syntax


HRESULT ScanNetwork(
  [out] ULONG *requestID
);

Parameters

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

This method initiates a network scan operation. When completed successfully, it populates the operating system's cache of visible providers and applications can call the GetVisibleProviders method of IMbnInterface to get a list of visible networks.

This is a time consuming operation. Therefore, applications should first call GetVisibleProviders and should call ScanNetwork only when the cached information is old.

This is an asynchronous operation and ScanNetwork will return immediately. If this method returns successfully (with S_OK), then upon completion of the scan operation, the operating system will call the OnScanNetworkComplete method of IMbnInterfaceEvents to notify the application of operation completion.

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

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

None supported

IDL

Mbnapi.idl

See also

IMbnInterface

 

 

Community Additions

Show:
© 2015 Microsoft