Platform SDK: Active Directory, ADSI, and Directory Services |
The IDirectorySearch::GetNextColumnName method gets the name of the next column in the search result that contains data.
HRESULT GetNextColumnName( ADS_SEARCH_HANDLE hSearchHandle, LPWSTR * ppszColumnName );
This method returns the standard return values, as well as the following:
For other return values, see ADSI Error Codes.
This method allocates sufficient memory for the column name, but the caller must call the FreeADsMem helper function to free this memory when it is no longer needed.
LPWSTR pszColumn; m_pSearch->GetFirstRow( hSearch ); printf("Column names are: "); while( m_pSearch->GetNextColumnName( hSearch, &pszColumn ) != S_ADS_NOMORE_COLUMNS ) { printf("%S ", pszColumn ); FreeADsMem( pszColumn ); }
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with DSClient).
Windows 95/98: Requires Windows 95 or later (with DSClient).
Header: Declared in Iads.h.