IWSDiscoveryProvider::SearchByType method (wsddisco.h)
Initializes a search for WS-Discovery hosts by device type.
Syntax
HRESULT SearchByType(
[in, optional] const WSD_NAME_LIST *pTypesList,
[in, optional] const WSD_URI_LIST *pScopesList,
[in, optional] LPCWSTR pszMatchBy,
[in, optional] LPCWSTR pszTag
);
Parameters
[in, optional] pTypesList
Pointer to a WSD_NAME_LIST structure that represents the list of discovery provider types to search for. May be NULL.
[in, optional] pScopesList
Pointer to a WSD_URI_LIST structure that represents the list of discovery provider scopes to search for. May be NULL.
[in, optional] pszMatchBy
Matching rule used for scopes. May be NULL.
[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 |
---|---|
|
Method completed successfully. |
|
The length in characters of pszMatchBy exceeds WSD_MAX_TEXT_LENGTH (8192) or the length in characters of pszTag exceeds WSD_MAX_TEXT_LENGTH (8192). |
|
A callback interface has not been attached. You must call Attach before calling this method. |
|
Not enough memory exists to perform the operation. |
Remarks
SearchByType initiates a WS-Discovery Probe in an attempt to locate discovery hosts matching the provided criteria. This method allows matching by types, scopes, some combination of the two, or matching all discovery capable devices (when no scopes or types are provided).
pszMatchBy should be provided if and only if pScopesList is also provided. 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.
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 |