Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Completes an asynchronous search for updates.
Syntax
HRESULT EndSearch(
[in] ISearchJob *searchJob,
[out] ISearchResult **retval
);
Parameters
[in] searchJob
The ISearchJob interface that the BeginSearch method returns.
[out] retval
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 |
---|---|
|
An asynchronous search for updates is successful. |
|
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. |
|
A parameter value is invalid or NULL. |
|
This method cannot be called from a remote computer. |
|
The EndSearch method returns WU_E_INVALID_OPERATION if EndSearch has already been called for the search job. |
|
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
Requirement | Value |
---|---|
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] |
Target Platform | Windows |
Header | wuapi.h |
Library | Wuguid.lib |
DLL | Wuapi.dll |