Platform SDK: Active Directory, ADSI, and Directory Services

IDirectorySearch

The IDirectorySearch interface provides a low overhead method that non-Automation clients can use to perform queries in the underlying directory.

Of the ADSI system-supplied providers, only the LDAP provider supports this interface.

The IDirectorySearch interface is a pure COM interface and exposes the following methods.

Methods in Vtable Order

IUnknown methods Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments reference count.
Release Decrements reference count.

IDirectorySearch methods Description
SetSearchPreference Sets options for conducting a search.
ExecuteSearch Executes an individual search.
AbandonSearch Abandons a search already under way.
GetFirstRow Gets the first row of the search result.
GetNextRow Gets the next row of the search result.
GetPreviousRow Gets the previous row of the search result.
GetNextColumnName Gets the name of the next column of the search result.
GetColumn Gets the item in a specified column from the current row of the search result.
FreeColumn Frees the ADS_SEARCH_COLUMN structure created by the GetColumn method.
CloseSearchHandle Releases the search result from memory.

Requirements

  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.