IDirectorySearch::GetColumn

Gets data from a column of the current row of the search result.

HRESULT GetColumn(
  ADS_SEARCH_HANDLE hSearchResult,  //Search result handle
  LPWSTR szColumnName,              //Name of requested column
  PADS_SEARCH_COLUMN pSearchColumn  //Contents of the requested 
                                    // column
);
 

Parameters

[in] hSearchResult
Handle to the search result.
[in] szColumnName
Name of the column whose data is requested.
[out] pSearchColumn
Address of a method-allocated ADS_SEARCH_COLUMN structure containing the column from current row of 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 column was obtained.

Remarks

The caller is responsible for freeing the memory allocated for the column by calling FreeColumn.

See Also

ADS_SEARCH_COLUMN, Using Directory Service Queries