IWSDiscoveryProviderNotify::SearchFailed method (wsddisco.h)

Is called to indicate a user initiated search has failed.

Syntax

HRESULT SearchFailed(
  [in]           HRESULT hr,
  [in, optional] LPCWSTR pszTag
);

Parameters

[in] hr

Cause of the search failure which initiated this callback. A value of S_FALSE indicates the search completed without issuing any Add callbacks.

[in, optional] pszTag

Optional identifier tag for this search. May be NULL.

Return value

The return value is not meaningful. An implementer should return S_OK.

Remarks

SearchComplete is called if any responses were successfully received.

SearchFailed is called if a user initiated query does not result in a response. In this case, the value of the hr parameter will be S_FALSE. SearchFailed can optionally be called if errors occur in the attempted transmission of the query, since query transmission is not necessarily synchronous. pszTag will match the user supplied tag from the query, and should be used to identify which query failed.

The interval between initiating the search with SearchByType or SearchById and receiving a SearchFailed notification is a maximum of 10 seconds, based on MATCH_TIMEOUT from WS-Discovery and amended by the DPWS Appendix I. The interval between initiating the search with SearchByAddress and receipt of a SearchFailed notification is typically 21 seconds, but can be a maximum of 150 seconds.

Note  Multiple simultaneous calls may be made to SearchFailed by the provider, so it is essential that shared data be synchronized in this callback.
 

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

IWSDiscoveryProviderNotify