Platform SDK: Active Directory, ADSI, and Directory Services |
The IDirectorySearch::SetSearchPreference method specifies a search preference for obtaining data in a subsequent search.
HRESULT SetSearchPreference( PADS_SEARCHPREF_INFO pSearchPrefs, DWORD dwNumPrefs );
This method supports the standard return values, as well as the following:
For other return values, see ADSI Error Codes.
The following C++ code snippet illustrates how to set the page size preference:
ADS_SEARCHPREF_INFO prefInfo[1]; prefInfo[0].dwSearchPref = ADS_SEARCHPREF_PAGESIZE; prefInfo[0].vValue.dwType = ADSTYPE_INTEGER; prefInfo[0].vValue.Integer = 100; hr = m_pSearch->SetSearchPreference( prefInfo, 1);
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.