Directory Services |
The IADsNamespaces interface is implemented by the ADs provider and is used for managing namespace objects. A namespace object is a provider-specific top-level container and corresponds to the root node of a directory tree. The ADSI namespaces object serves as an entry point into the underlying directory and allows directory service administrators to enumerate the currently installed namespace objects.
This interface supports two property methods to get and set the DefaultContainer property which holds the path to a container object. The default container is the base node from which browsing of the directory tree proceeds. References of any children objects can be made relative to this default container. The DefaultContainer property makes it more efficient and convenient for a client to reference repetitively a contained object.
Obtain a pointer to the IADsNamespaces interface when you bind to the object using the "ADs:" string:
[Visual Basic]
Dim ns As IADsNamespaces
Set ns = GetObject("ADs:")
Non-Automation clients can use the ADsGetObject helper function instead.
[C++]
IADsNamespaces *pNs;
hr = ADsGetObject(L"ADs:", IID_IADsNamespaces, (void**)&pNs);
In addition to the IADsNamespaces interface, the ADSI namespaces object also implements the IADsContainer interface.
The IADsNamespaces interface inherits the methods of the standard COM interface IUnknown.
In addition, IADsNamespaces defines the following methods, including those inherited from IADs.
Method | Description |
---|---|
get_DefaultContainer | Gets the default container name that is stored in the registry key data for the current user. This is a base container from which ADSI searches can be conducted. |
put_DefaultContainer | Sets the default container name that is stored in the registry key data for the current user. This is a base container from which ADSI searches can be conducted. |
The IADsNamespaces interface defines the following property. The preceding table includes access methods for this property.
Property | Description |
---|---|
DefaultContainer | Gets and sets the default container name for the current user. |
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.