The IADsClass Interface

This is by far the most complex interface in ADSI, and it contains the following properties:

Property Type Description
PrimaryInterface
BSTR
UUID of optional provider-specific interface that can be used for direct access to this class's properties.
CLSID
BSTR
Class identifier of optional provider-specific associated COM object
OID
BSTR
Provider-specific Object Identifier defining the class
Abstract
VARIANT_BOOL
Abstract class flag; if set, this class cannot be instantiated, although other classes can be derived from it
Auxiliary
VARIANT_BOOL
Auxiliary class flag; if set, this class cannot be instantiated, although other classes can use it as a source of additional properties (see
AuxDerivedFrom
below)
MandatoryProperties
VARIANT
Array of names of mandatory properties
OptionalProperties
VARIANT
Array of names of optional properties
NamingProperties
VARIANT
Array of names of properties that go to make up the Relative Distinguished Name (RDN) for this class of object; the RDN is a set of properties that uniquely identifies the object
DerivedFrom
VARIANT
Array of pathnames of classes that this class is derived from
AuxDerivedFrom
VARIANT
Array of pathnames of auxiliary classes that this class is derived from
PossibleSuperiors
VARIANT
Array of pathnames of classes that can contain instances of this class
Containment
VARIANT
Array of pathnames of classes that can be contained within this class
Container
VARIANT_BOOL
Flag indicating whether or not objects of this class are containers
HelpFileName
BSTR
Name of help file (may not be implemented)
HelpFileContext
long
Help context identifier (may not be implemented)

It also has a single method, which may optionally be implemented:

Method Parameters Description
Qualifiers()
[out, retval] IADsCollection **ppQualifiers
Returns collection of objects describing additional qualifiers

We needn't concern ourselves too much with some of the more obscure features of this interface for the time being. Instead, let's just pick out a couple for special attention:

PrimaryInterface

OID

Firstly, take a look at that

PrimaryInterface
property. For a lot of object classes, there is a further interface available to allow easy access to the properties contained therein. For example, all objects of class
User
implement a further ADSI interface called
IADsUser
, which has about three pages of properties like
FullName
and
FirstName
and so on. If you want to use these, I recommend that you take a look at the Microsoft documentation for the interface in question.

The next interesting property is

OID
, the Object Identifier. We won't be seeing any value in this slot for the
WinNT:
namespace, but it will acquire greater significance later on, when we look at LDAP. This is a universally unique identifier for the class. Unfortunately, it's not a UUID as we have come to know and love them, but rather a sequence of numbers allocated by a central standards authority. I'll come back to this a little later on.

By far the most important properties in the interface are, of course, the … er … properties themselves, mandatory and optional. We're in severe danger of terminology overlap here, and there is a shift in the more recently developed interfaces towards the use of the term attribute rather than property. However, provided we keep our wits about us, we shouldn't get too confused. These two lists of properties (or attributes) effectively define every object that is a member of this class. Going back to our

User
class example, we have things like
FullName
,
Description
,
LastLogin
and so on.

© 1998 by Wrox Press. All rights reserved.