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
);
This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:
The caller is responsible for freeing the memory allocated for the column by calling FreeColumn.
ADS_SEARCH_COLUMN, Using Directory Service Queries