Platform SDK: Active Directory, ADSI, and Directory Services |
The IADsNamespaces interface is implemented in a namespaces object and 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.
You obtain a pointer to the IADsNamespaces interface when you bind to the object using the "ADs:" string:
Dim ns As IADsNamespaces Set ns = GetObject("ADs:")
Non-Automation clients can use the ADsGetObject helper function instead.
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 object exposes the following property methods.
IUnknown methods | Description |
---|---|
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IADsNamespaces property methods | Description |
---|---|
get/put_DefaultContainer | Gets and sets the default container name for the current user. |
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.