Code Examples

The following links take you directly to ADSI code examples:

ADsPaths

Examples of ADsPaths.

Binding to an Object

Binding to a directory object (Automation and (C or C++ Examples).

Accessing an Individual Property in the Property Cache

Get and put methods (Automation example).

Get methods (COM vtable example).

Authentication

Use of the OpenDSobject.

Creating a Security Descriptor Object

How to create a security descriptor object (VB example).

Enumerating the ACLs on an ADSI Object

How to enumerate the discretionary ACL (VB example).

ADSI SQL Grammar

Formal grammar for the SQL queries.

ADSI OLE DB Example

Query a directory service.

Using ADO for Querying

User accounts on an ldap server.

Using IDirectorySearch for Querying

Query a directory service.

Automation Examples

Automation - Retrieving a Property From an ADSI Object

Automation - Browsing a Schema Class Definition

Automation - Adding Users to a Group

Automation - Removing Users From a Group

Automation - Listing Children in a Container

Automation - Enumerating Users in a Group

Automation - Creating a User Object

Automation - Deleting a User Object

Automation - Using a Filter

Java - Binding to an ADSI Object

Query Examples Using ADO

COM Vtable Examples

COM Vtable Examples - Querying a Namespace

COM Vtable Examples - Setting Properties

COM Vtable Examples - Adding Users to a Group

COM Vtable Examples - Removing Users from a Group

COM Vtable Examples- Enumerating Users in a Group

COM Vtable Examples - Creating a User Object

COM Vtable Examples - Deleting a User Object