Platform SDK: Active Directory, ADSI, and Directory Services |
When you call GetObject, ADsGetObject, ADsOpenObject, or IADsOpenDSObject::OpenDSObject, ADSI creates a COM object that represents the specified directory object. Normally, ADSI first retrieves the objectClass property so that ADSI can expose the COM interfaces that are appropriate for that class of object. For example, a user object would expose the IADsUser interface in addition to the base ADSI interfaces supported for all objects (such as IADs, IDirectorySearch, IDirectoryObject, and so on).
For a single operation, this should have no effect on performance. However, if you are doing batch operations that require hundreds or thousands of bindings over a slow connection and those operations are write methods in the base ADSI interfaces (such as IADs::Put and IDirectoryObject::SetObjectAttributes), you may want to trade off full object support (that is, the object-specific interfaces such as IADsUser on user objects) for faster binding. To do this, use the ADS_FAST_BIND flag for ADsOpenObject and IADsOpenDSObject::OpenDSObject.
The ADS_FAST_BIND flag has the following effects: