Share via


Synchronous Searching

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

The IUPnPDeviceFinder interface enables both synchronous and asynchronous searches. Synchronous searches are completed and return control to the calling application only after all available devices are found.

Synchronous searches are best used for command-line interfaces. Because the time required to complete a synchronous search can cause an application to become unresponsive, they are not recommended for single-threaded graphical user interfaces.

Synchronous searches run only when called; therefore, they only find devices that are on the network at the time of the search. To be continually updated when new devices appear on the network, consider using an asynchronous search, as explained in Asynchronous Searching.

To perform a synchronous search, use one of the following IUPnPDeviceFinder:IDispatch methods:

  • IUPnPDeviceFinder::FindByType - This method searches by device or service type by accepting a type URI as an input parameter. It returns a collection of objects that implement the IUPnPDevice interface, one for each device that matched the specified criteria.
  • IUPnPDeviceFinder::FindByUDN - This method searches by unique device name (UDN). It returns a reference to a single object that implements the IUPnPDevice interface, or NULL if the specified device cannot be found.

See Also

Concepts

Device Location