Hi, Could anyone point me to a C++ sample which does ldap sorting? An example related to Active Directory would be great. I am not able to get ldap_create_sort_control to work. It throws some exception. Its not clear whether the first parameter - LDAPSortKey list - ends with a NULL or not. Any help is appreciated. Thanks, -sanju