Skip to content

goyuix/ADSI

Repository files navigation

Tree Logo ADSI Managed Wrapper

Why does this library exist?

There is an incompatibility between the ADSI COM interfaces and the DLR that prevents using the dynamic keyword. More information is available at the following Stack Overflow question: Why does dynamic method invoke fail when reflection still works?

What does this library provide?

This package provides a managed implementation to the various ADSI Data Types and Constants, Structures, Enumerations, Functions, Interfaces, System Providers, Error Codes, and Extended Error Messages It also provides some convenient overrides for the methods to allow the default ADSI behaviors without having to explicitly specify those parameters. Currently the library targets .NET 2.0 and has been tested and used with the 4.0 framework without issues.

Example Usage

The following code uses the current user identity as an NT-style login string (domain\user) and converts it to an RFC 1779 distinguished name format:

var principal = WindowsIdentity.GetCurrent();
var nto = new NameTranslate();
var dn = nto.Translate(principal.Name, ADS_NAME_TYPE.ADS_NAME_TYPE_1779);

Roadmap

  • 0.1 - Initial NameTranslate support and NuGet package
  • ...
  • 1.0 - Complete wrappers for all ADSI enumerations, interfaces and objects

Special Thanks

  • Kate England for an attribution free icon that looks great with this project. I have never met you and we may never interact - but you have my deep gratitude!

About

Managed wrapper for dynamic-unfriendly ADSI COM objects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages