Compartir a través de


ldap_parse_result (Windows CE 5.0)

Send Feedback

This function parses responses from the server and returns the appropriate fields.

ULONG ldap_parse_result(LDAP* Connection,LDAPMessage* ResultMessage,ULONG* ReturnCodeOPTIONAL,UNICODE PTCHAR* MatchedDNsOPTIONAL,UNICODE PTCHAR* ErrorMessageOPTIONAL,UNICODE PTCHAR** ReferralsOPTIONAL,LDAPControl*** ServerControlsOPTIONAL,BOOLEANFreeit);

Parameters

  • Connection
    [in] Session handle.
  • ResultMessage
    [in] Result of an LDAP operation as returned by one of the synchronous operation calls or by ldap_result for an asynchronous operation.
  • ReturnCode
    [out] Indicates the outcome of the server operation that generated the original result message. Pass NULL to ignore this field.
  • MatchedDNs
    [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.
  • ErrorMessage
    [out] Contents of the error message field from the ResultMessage parameter. Pass NULL to ignore this field.
  • Referrals
    [out] Contents of the referrals field from the ResultMessage parameter, indicating zero or more alternate LDAP servers where the request should be retried. Pass NULL to ignore this field.
  • ServerControls
    [out] Result parameter filled in with an allocated array of controls copied from the ResultMessage parameter.
  • Freeit
    [in] Determines whether the ResultMessage parameter is freed. You can pass any nonzero value to the Freeit parameter to free the ResultMessage pointer when it is no longer needed, or you can call the ldap_msgfree function to free the result later.

Return Values

If this function succeeds, the return value is LDAP_SUCCESS.

If this function fails, it returns an error code. See the LDAP_RETCODE enumeration for a list of possible return values.

Remarks

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 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.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Winldap.h.
Link Library: Wldap32.lib.

See Also

LDAP_RETCODE | ldap_controls_free | ldap_memfree | ldap_msgfree | ldap_value_free | ldap_result

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.