DrtGetSearchResultSize function (drt.h)

The DrtGetSearchResultSize function returns the size of the next available search result.

Syntax

HRESULT DrtGetSearchResultSize(
  [in]  HDRT_SEARCH_CONTEXT hSearchContext,
  [out] ULONG               *pulSearchResultSize
);

Parameters

[in] hSearchContext

Handle to the search context to close. This parameter is returned by the DrtStartSearch function.

[out] pulSearchResultSize

Holds the size of the next available search result.

Return value

Returns S_OK if the function succeeds. Other possible values include:

Return code Description
E_INVALIDARG
pulSearchResultSize is NULL.
E_HANDLE
hSearchContext is an invalid handle.
DRT_E_FAULTED
The DRT cloud is in the faulted state.
DRT_E_NO_MORE
There are no more results to return.
DRT_E_TIMEOUT
The search failed because it timed out.
DRT_E_SEARCH_IN_PROGRESS
The search is still in progress.

Remarks

The application will receive S_OK and continue to loop using the DrtGetSearchResultSize and DrtGetSearchResult functions as long as the queue contains the search results. When the queue is empty the DrtGetSearchResult function will return DRT_E_SEARCH_IN_PROGRESS or DRT_E_NO_MORE.

Requirements

Requirement Value
Minimum supported client Windows 7 Professional [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header drt.h
Library Drt.lib
DLL Drt.dll

See also

DrtStartSearch