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



The information in this article applies to:

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

This article was previously published under Q244058

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.

REFERENCES

The AddGroup sample can be found in the Platform SDK at:

<Microsoft Platform SDK installation root directory>\Samples\NetDS\ADSI\Samples\ActiveDir\AddGroup

For more information on the ADSI and IDirectorySearch interface, see the Platform SDK Documentation and these Microsoft Web sites:
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Modification Type:MajorLast Reviewed:2/12/2004
Keywords:kbDSWADSI2003Swept kbMsg kbprb KB244058 kbAudDeveloper