IUpdateSearcher::EndSearch method
Completes an asynchronous search for updates.
Syntax
HRESULT EndSearch(
[in] ISearchJob *searchJob,
[out] ISearchResult **retval
);
Parameters
searchJob [in]
The ISearchJob interface that the BeginSearch method returns.retval [out]
An ISearchResult interface that contains the following:- The result of an operation
- A collection of updates that match the search criteria
Return value
Returns S_OK if successful. Otherwise, returns a COM or Windows error code.
This method can also return the following error codes.
Return code | Description |
---|---|
S_OK | An asynchronous search for updates is successful. |
WU_E_LEGACYSERVER | You cannot search for updates if the ServerSelection property of IUpdateSearcher is set to ssManagedServer or to ssDefault, and the managed server on a computer is a Microsoft Software Update Services (SUS) 1.0 server. |
E_POINTER | A parameter value is invalid or NULL. |
E_ACCESSDENIED | This method cannot be called from a remote computer. |
WU_E_INVALID_OPERATION | The EndSearch method returns WU_E_INVALID_OPERATION if EndSearch has already been called for the search job. |
WU_E_INVALID_CRITERIA | An invalid criteria was encountered during a search. |
Remarks
When you use any asynchronous WUA API in your app, you might need to implement a time-out mechanism. For more info about how to perform asynchronous WUA operations, see Guidelines for Asynchronous WUA Operations.
Requirements
Minimum supported client |
Windows XP, Windows 2000 Professional with SP3 [desktop apps only] |
Minimum supported server |
Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only] |
Header |
Wuapi.h |
IDL |
Wuapi.idl |
Library |
Wuguid.lib |
DLL |
Wuapi.dll |