Platform SDK: Active Directory, ADSI, and Directory Services |
Let's revisit our scenario. When late binding support is in place, every function call must go through the ADSI IDispatch interface, before it is re-routed to the appropriate extension. Consider the following code snippet:
Set x = GetObject("LDAP://CN=JSmith, OU=Sales, DC=Microsoft,DC=COM") x.SetPassword("newPassword") x.MyNewMethod( "\\srv\public") x.MyProperty = "Hello World" x.OtherMethod() x.OtherProperty = 4362 Debug.Print x.LastName
Notice that there are no explicit calls to the QueryInterface method to get to the extensions. The extensions must re-route their IDispatch calls to the ADSI IDispatch interface. ADSI makes the decision and resolves any conflicts that occur, then it re-routes back to the appropriate extension using an interface called IADsExtension. Therefore, any extension that supports late binding must implement IADsExtension.