You can definitely modify schema with S.DS and it can be done without using
any of the interop stuff from the NativeObject property or by invoking
methods on other ADSI interfaces.
Here is a thread from Google that kind of shows how Jamie Vachon figured
this out earlier this year (for attributes at least):
The basic concept is that you are essentially just using the IADs interface
to do the schema extensions. That said, if you bind to an object in the
directory that is a classSchema or attributeSchema, you should be able to
cast it to one of the ADSI schema interfaces (assuming you have imported the
Hopefully that will give you what you need to get going.
> 2 questions (see below):
> I need to create new ADAM attributes and classes.
> Actually, I'm doing this to programmatically load a new
> schema into a new and empty ADAM instance.
> I'm doing this as an alternative to the LDIFDE tool. I
> feel that it will be easier to maintain an XML
> representation of the schema and this code that it would
> be to maintain a large LDIF file.
> I can see how to use the ADSI interfaces to do this, and
> I know about DirectoryEntry.NativeObject.
> (1) Am I correct in assuming that DirectoryServices has
> NOT exposed the interfaces necessary to extend a schema
> as I've described above?
> (2) Can DirectoryEntry.NativeObject be in fact cast as
> IADsProperty, IADsClass, or IADsSyntax?
> Thanks much,