Partager via


Asynchronous Searching (Windows Embedded CE 6.0)

1/6/2010

The IUPnPDeviceFinder interface enables both synchronous and asynchronous searches. Asynchronous searches return control to the calling application immediately. The application is notified about each individual device as it is found, using a callback interface registered by the application.

Asynchronous searches are best used for graphical user interfaces and applications that perform continuous monitoring.

Because an asynchronous search runs in the background until you cancel it, it will find devices that are on the network at the time of the search and any devices that appear at a later time.

To perform an asynchronous search:

  1. Create an IUPnPDeviceFinder instance, as explained in Device Finder Creation.
  2. Create an asynchronous search operation using IUPnPDeviceFinder::CreateAsyncFind.
  3. Start the asynchronous search operation using IUPnPDeviceFinder::StartAsyncFind.
  4. Receive callback notifications and take the appropriate processing steps.
  5. When the search is no longer needed, cancel the search and release the associated objects.

See Also

Concepts

Device Location
Synchronous Searching