Directory Services |
Two types of data are returned by the server for VLV searches: first, the return set of list entries, which are the directory objects and attributes retrieved by the VLV search, and second, metadata about the search, such as the approximate number of entries in the return set, the context ID, and an approximation of the offset value. List entries retrieved by the search are returned by the IDirectorySearch::GetNextRow method. VLV search metadata responses are retrieved by a call to the IDirectorySearch::GetColumn method.
To retrieve the VLV metadata
The following code example shows how to retrieve VLV results.
#include <iads.h> HRESULT hr = S_OK; ADS_VLV vlv; // Perform the SetSearchPreference. // . . . // Perform the ExecuteSearch. // . . . // Perform GetNextRow. hr = pDSSearch->GetColumn( hSearch, ADS_VLV_RESPONSE, &col ); vlv = *((PADS_VLV) col.pADsValue.ProviderSpecific.lpValue); // Perform another operation. hr = pDSSearch->FreeColumn( &col);