IDirectorySearch::GetNextColumnName

Gets the name of the next column in the search result that contains data.

HRESULT GetNextColumnName(
  ADS_SEARCH_HANDLE hSearchResult,  //Search result handle
  LPWSTR * ppszColumnName           //Name of next column with data
);
 

Parameters

[in] hSearchResult
Handle to the search result.
[out] ppszColumnName
Address of a pointer to a method-allocated string containing the requested column name. If NULL, no subsequent rows contain data.

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 name of the next column containing data was successfully obtained.

Remarks

The caller is responsible for freeing the memory allocated for the column name.

See Also

Using Directory Service Queries