Platform SDK: Active Directory, ADSI, and Directory Services

Using ADsOpenObject

To establish credentials when passing a bind request to a directory service, use the ADsOpenObject function instead of GetObject. With ADsOpenObject, you have more control over how binding should be achieved. In addition to specifying the user and password, you can specify other flags.