Directory Services |
The IDirectorySearch::FreeColumn method releases memory that the IDirectorySearch::GetColumn method allocated for data for the column.
HRESULT FreeColumn( PADS_SEARCH_COLUMN pSearchColumn );
This method returns the standard return values, as well as the following:
For other return values, see ADSI Error Codes.
Return Code | Description |
---|---|
S_OK | The column was freed successfully. |
E_ADS_BAD_PARAMETER | The specified column is invalid or contains invalid attributes. |
ADS_SEARCH_COLUMN col; /*.. omit set preference and execute … */ while( m_pSearch->GetNextRow( hSearch) != S_ADS_NOMORE_ROWS ) { // Get the Name and display it in the list. hr = m_pSearch->GetColumn( hSearch, pszAttr[0], &col ); if ( SUCCEEDED(hr) ) { if (col.dwADsType == ADSTYPE_CASE_IGNORE_STRING) printf("%S\n", col.pADsValues->CaseIgnoreString); m_pSearch->FreeColumn( &col ); } } m_pSearch->CloseSearchHandle( hSearch );
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.
IDirectorySearch, IDirectorySearch::GetColumn, ADSI Error Codes