IWSDiscoveryProvider::SearchByAddress (Windows Embedded CE 6.0)
1/6/2010
This method initializes a search for WS-Discovery hosts by device address.
Syntax
HRESULT SearchByAddress(
LPCWSTR pszAddress,
LPCWSTR pszTag
);
Parameters
- pszAddress
[in] The HTTP transport address of the device.
- pszTag
[in, optional] Optional identifier tag for this search. May be NULL.
Return Value
The following table shows the possible error code return values.
Error code | Description |
---|---|
S_OK |
This method completed successfully. |
E_INVALIDARG |
pszAddress is NULL, the length in characters of pszAddress exceeds WSD_MAX_TEXT_LENGTH (8192), or the length in characters of pszTag exceeds WSD_MAX_TEXT_LENGTH (8192). |
E_ABORT |
A callback interface has not been attached. IWSDiscoveryProvider::Attach must be called before calling this method. |
E_OUTOFMEMORY |
Not enough memory exists to perform the operation. |
Remarks
SearchByAddress initiates a WS-Discovery Probe over HTTP in an attempt to identify a device at a known URL. The Probe is sent to the address specified by pszAddress. This call may result in one or more IWSDiscoveryProviderNotify::Add callbacks. If any Add callbacks are issued before the search completes, a IWSDiscoveryProviderNotify::SearchComplete callback will be issued; otherwise, a IWSDiscoveryProviderNotify::SearchFailed callback will be issued.
pszTag is an optional user provided string which will be fed back in either callback, allowing the caller to associate the callback with the original query.
For information about troubleshooting applications calling this method, see this Microsoft Web site.
Requirements
Header | wsdapi.h |
Library | wsdapi.lib |
Windows Embedded CE | Windows Embedded CE 6.0 R2 |