Im using Ldap to get the list of users and groups from the active directory. When I apply a filter like "(&(objectClass=user)(samAccountName=L*))" then I get all users with Samaccount name starting with L and the list returned is sorted. Though I did not use any sorting mechanism. Is it that for search filter, it first sorts and then filters the results? Also when I give a filter ""(&(objectClass=user)(samAccountName=*))" I get all users sorted.
But the same thing doesnot work for groups. Can somebody throw some light on this.
Or can some one atlease provide a sample on how to retrieve sorted results from LDAP search using C++