ldap_parse_extended_resultA function (winldap.h)

The ldap_parse_extended_result parses the results of an LDAP extended operation.

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_parse_extended_resultA(
  [in]  LDAP        *Connection,
  [in]  LDAPMessage *ResultMessage,
  [out] PSTR        *ResultOID,
  [out] berval      **ResultData,
  [in]  BOOLEAN     Freeit
);

Parameters

[in] Connection

The session handle.

[in] ResultMessage

A pointer to an LDAPMessage structure as returned by ldap_result in response to an extended operation request.

[out] ResultOID

A pointer to a null-terminated string that contains the dotted object identifier (OID) text string of the server's response message. This is normally the same OID as the one naming the request that was originally passed to the server by ldap_extended_operation.

[out] ResultData

The arbitrary data returned by the extended operation (if NULL, no data is returned by the server).

[in] Freeit

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 ldap_msgfree to free the result later.

Return value

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.

Remarks

When a server processes an extended operation request generated by ldap_extended_operation, it returns an LDAP message along with an LDAP_RES_EXTENDED return code. Use ldap_parse_extended_result to parse this result message, which returns both the text OID of the originating message in ResultOID and any arbitrary data generated by the extended operation in ResultData.

When they are no longer needed, free the ResultOID string and the ResultData buffer by calling ldap_memfree.

Note

The winldap.h header defines ldap_parse_extended_result as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header winldap.h
Library Wldap32.lib
DLL Wldap32.dll

See also

Functions

LDAPMessage

Return Values

ldap_extended_operation

ldap_memfree

ldap_msgfree

ldap_result