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 more information and other return values, see ADSI Error Codes.
Return Code | Description |
---|---|
S_OK | The search preference was set. |
E_ADS_BAD_PARAMETER | The caller supplied an invalid array of ADS_SEARCHPREF_INFO structures. |
The following C++ code example shows 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);
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.