|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
This function parses responses from the server and returns the appropriate fields.
ULONG ldap_parse_result( LDAP* Connection, LDAPMessage* ResultMessage, ULONG* ReturnCode OPTIONAL, UNICODE PTCHAR* MatchedDNs OPTIONAL, UNICODE PTCHAR* ErrorMessage OPTIONAL, UNICODE PTCHAR** Referrals OPTIONAL, LDAPControl*** ServerControls OPTIONAL, BOOLEAN Freeit );
[in] Session handle.
[in] Result of an LDAP operation as returned by one of the synchronous operation calls or by ldap_resultfor an asynchronous operation.
[out] Indicates the outcome of the server operation that generated the original result message. Pass NULL to ignore this field.
[out] In the case of a return of LDAP_NO_SUCH_OBJECT, this result parameter is filled in with a distinguished name indicating how much of the name in the request was recognized. Pass NULL to ignore this field.
[out] Contents of the error message field from the ResultMessageparameter. Pass NULL to ignore this field.
[out] Contents of the referrals field from the ResultMessageparameter, indicating zero or more alternate LDAP servers where the request should be retried. Pass NULL to ignore this field.
[out] Result parameter filled in with an allocated array of controls copied from the ResultMessageparameter.
[in] Determines whether the ResultMessageparameter is freed. You can pass any nonzero value to the Freeitparameter to free the ResultMessagepointer when it is no longer needed, or you can call the ldap_msgfreefunction to free the result later.
If this function succeeds, the return value is LDAP_SUCCESS.
If this function fails, it returns an error code. See the LDAP_RETCODEenumeration for a list of possible return values.
This 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 messages of type LDAP_RES_SEARCH_ENTRY and LDAP_RES_SEARCH_REFERENCE.
When they are no longer needed, free the ErrorMessageand MatchDNsstrings by calling ldap_memfree. Free the Referralsarray by calling ldap_value_free. Free the ServerControlsby calling ldap_controls_free.
|Windows Embedded CE||Windows CE .NET 4.0 and later|
|Windows Mobile||Windows Mobile Version 5.0 and later|