8.2.1 Friendly Names for Namespaces

The each Namespace object in the namespaces container represents an ADSI provider. The IADs::Name property for a given Namespace object is the Programmatic Identifier (PROGID) used to form ADS Paths for objects in the namespace. This is typically a sort string that may not be immediately meaningful to users. For example, "NWCOMPAT" is the string used for the NetWare 3.x compatible provider implemented by Microsoft. A namespace provider that wants to provide a "friendly name" to users must implement a property called "friendlyName" on the namespace object. This property is read using the generic get method in the IADs:: interface implemented by the namespace object.

'

' Reading the friendly names of providers in VB

'

dim c as IADsContainer

dim n as IADs

set c = GetObject("ADS://") ' Get the Namespaces container

for each n in c ' loop through all namespace objects

debug.print n.Get("friendlyName") ' report the friendly name

next n