Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The IUPnPDeviceFinderinterface 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:IDispatchmethods:
-
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
IUPnPDeviceinterface, 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
IUPnPDeviceinterface, or NULL if the specified device cannot
be found.