Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

DirectoryServices Assembly

The following code allows me to determine if a user is a member of a specific group:

        Dim groupEntry As New System.DirectoryServices.DirectoryEntry
        Dim blnVal As Boolean
        groupEntry.Path = ("WinNT://mydomain/mygroup")
        blnVal = groupEntry.Invoke("IsMember", "WinNT://mydomain/myuser")

The problem is, the "IsMember" parameter of the Invoke method wasn't readily apparent to me.  I couldn't find it in the help file or object model.  I finally found it in a google search.  How do I find out what the other available Invoke parameters are?

Friday, February 11, 2005

I think this is what you're looking for:

The only other argument for the IsMember method is the boolean pointer that can assume the desired value after the method call (I believe).

- Tharsan

Friday, February 11, 2005

Hi - thanks for the reply.
That link did answer my question about what methods are available.

My real complaint is that if I use com and reference the Active DS Type Library , all of the properties and methods are readily apparent via the object browser.  But if I use the .net DirectoryServices assembly (which I believe is mostly just a signed wrapper around the Active DS type library) the properties and methods are hidden behind an abstraction layer.

This doesn't seem like like a good thing to me - and it isn't consistent with the other .net assemblies I have used.

Friday, February 11, 2005

*  Recent Topics

*  Fog Creek Home