Platform SDK: Active Directory, ADSI, and Directory Services

IDirectoryObject

The IDirectoryObject interface provides non-Automation clients with direct access to directory service objects. The interface enables access by means of a direct on-the-wire protocol, rather than through the ADSI property cache. Using the on-the-wire protocol helps to optimize performance. In place of the properties supported by the IADs interface, IDirectoryObject provides methods that support a subset of an object's properties and provide access to its attributes. With IDirectoryObject, a client can get or set any number of object attributes with one method call. Unlike the corresponding Automation methods, which are invoked in batch, those of IDirectoryObject are executed as soon as they are called. Properties are not cached when this interface handles them.

Non-Automation clients can call the methods of IDirectoryObject to optimize performance and take full advantage of native directory service interfaces. Automation clients cannot use IDirectoryObject. Instead, they should use the IADs interface.

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

The IDirectoryObject 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.

IDirectoryObject methods Description
GetObjectInformation Gets information about a directory service object.
GetObjectAttributes Gets one or more attributes of a directory service object.
SetObjectAttributes Sets one or more attributes of a directory service object.
CreateDSObject Creates a directory service object.
DeleteDSObject Deletes a directory service object.

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.

See Also

IADs