Platform SDK: Active Directory, ADSI, and Directory Services |
The ldap_parse_result function parses responses from the server and returns the appropriate fields.
ULONG ldap_parse_result ( LDAP* Connection, LDAPMessage* ResultMessage, ULONG* ReturnCode OPTIONAL, PWCHAR* MatchedDNs OPTIONAL, PWCHAR* ErrorMessage OPTIONAL, PWCHAR** Referrals OPTIONAL, PLDAPControl** ServerControls OPTIONAL, BOOLEAN Freeit );
If the function succeeds, the return value is LDAP_SUCCESS.
If the function fails, it returns an error code. See Return Values for more information.
The ldap_parse_result function traverses a chain of server responses looking for result messages to parse. Use this function if you want to access the referrals, matching distinguished names, or server controls returned. The function skips over messages of type LDAP_RES_SEARCH_ENTRY and LDAP_RES_SEARCH_REFERENCE.
When they are no longer needed, free the ErrorMessage and MatchDNs strings by calling ldap_memfree. Free the Referrals array by calling ldap_value_free. Free the ServerControls by calling ldap_controls_free.
Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.
Unicode: Declared as Unicode and ANSI prototypes.
Functions, ldap_controls_free, ldap_memfree, ldap_msgfree, ldap_value_free, ldap_result, Return Values