Microsoft KB Archive/244058

{|
 * width="100%"|

PRB: Platform SDK Sample AddGroup Generates Errors When Using IDirectoryObject and WinNT Provider

 * }

Q244058

-

The information in this article applies to:


 * Microsoft Active Directory Services Interface, System Component
 * Microsoft Active Directory Service Interfaces, version 2.5
 * Microsoft Active Directory Services Interface, Microsoft Active Directory Client

-

SYMPTOMS
The AddGroup ADSI sample in the Platform SDK generates "bad ADsPath" errors when you are using a WinNT ADsPath. The sample only works with providers that support the IDirectoryObject interface.

MORE INFORMATION
The WinNT provider does not support the IDirectoryObject interface. The only Active Directory Services Interface (ADSI) system-supplied providers that support the IDirectoryObject interface are the Lightweight Directory Access Protocol (LDAP) and Novell Netware Directory Services (NDS) providers.

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 can use the IADs interface.