IDirectorySearch::GetFirstRow

Gets the first row of a search result.(

HRESULT GetFirstRow(
  ADS_SEARCH_HANDLE hSearchResult,  //Search result handle
);
 

Parameters

[in] hSearchResult
Handle to the search result.

Return Values

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

S_OK
The next row was successfully obtained.
S_ADS_NOMORE_ROWS
The current row before the call was the last row in the search result. The current row was not changed.

See Also

Using Directory Service Queries