Directory Services


The ldap_memfree function frees memory allocated from the LDAP heap.

VOID ldap_memfree(
  PCHAR Block


[in] A pointer to a null-terminated string that contains a pointer to memory allocated by the LDAP library.

Return Values



Call ldap_memfree to free strings, such as the attribute names returned by ldap_*_attribute, or distinguished names returned by ldap_get_dn. Do not free the static buffers used by ldap_open, ldap_get_values, and others.


Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Unicode: Implemented as Unicode and ANSI versions on all platforms.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.

See Also

Functions, ldap_get_dn, ldap_get_values, ldap_open