Enclose the API definitions in an extern "C" section and define LDAPAPI. Better stick to the types defined by the PSDK. Fix the ldap_create_vlv_control*() prototypes. Update win32.api.
ldap_encode_sort_control{A,W}. Add a stub for ldap_create_page_control{A,W}.
ldap_free_controls*.