ldap_control_freeW function (winldap.h)

The ldap_control_free function frees an LDAPControl structure.

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_control_freeW(
  [in] LDAPControlW *Control
);

Parameters

[in] Control

The LDAPControl structure to free.

Return value

If the function succeeds, LDAP_SUCCESS is returned.

If the function fails, an error code is returned. For more information, see Return Values.

Remarks

Use this function to free an LDAPControl structure previously allocated by an LDAP function call, such as one allocated by a call to ldap_create_page_control or ldap_create_vlv_control.

Note  This function should only be used to free a control created internally by LDAP API functions. It is not used to free memory that is explicitly allocated by the user program.
 

Note

The winldap.h header defines ldap_control_free 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

LDAPControl

Return Values

ldap_create_page_control

ldap_create_vlv_control