Export (0) Print
Expand All

IDirectorySearch::FreeColumn method

The IDirectorySearch::FreeColumn method releases memory that the IDirectorySearch::GetColumn method allocated for data for the column.

Syntax


HRESULT FreeColumn(
  [in]  PADS_SEARCH_COLUMN pSearchColumn
);

Parameters

pSearchColumn [in]

Provides a pointer to the column to be freed.

Return value

This method returns the standard return values, as well as the following:

For other return values, see ADSI Error Codes.

Return codeDescription
S_OK

The column was freed successfully.

E_ADS_BAD_PARAMETER

The specified column is invalid or contains invalid attributes.

 

Examples


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 );

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Iads.h

DLL

Activeds.dll;
Adsldp.dll;
Adsldpc.dll

IID

IID_IDirectorySearch is defined as 109BA8EC-92F0-11D0-A790-00C04FD8D5A8

See also

IDirectorySearch
IDirectorySearch::GetColumn
ADSI Error Codes

 

 

Show:
© 2014 Microsoft