IWSDiscoveryProvider::SearchByAddress method (wsddisco.h)

Initializes a search for WS-Discovery hosts by device address.

Syntax

HRESULT SearchByAddress(
  [in]           LPCWSTR pszAddress,
  [in, optional] LPCWSTR pszTag
);

Parameters

[in] pszAddress

The HTTP transport address of the device.

[in, optional] pszTag

Optional identifier tag for this search. May be NULL.

Return value

Possible return values include, but are not limited to, the following:

Return code Description
S_OK
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. You must call Attach 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 Add callbacks. If any Add callbacks are issued before the search completes, a SearchComplete callback will be issued; otherwise, a SearchFailed callback will be issued. The interval between initiating the search and receiving either of these notifications can be up to 30 seconds.

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 Troubleshooting WSDAPI Applications.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wsddisco.h (include Wsdapi.h)
DLL Wsdapi.dll

See also

IWSDiscoveryProvider