Directory Services


The ber_flatten function allocates a new berval structure containing the data taken from the supplied BerElement structure.

INT ber_flatten(
  BerElement* pBerElement,
  PBERVAL* pBerVal


[in] Pointer to the source BerElement structure.
[out] Pointer to the newly allocated berval structure, which should be freed using ber_bvfree.

Return Values

The function returns 0 on success and -1 on failure.


The use of ber_flatten on a BerElement in which all { and } format modifiers have not been properly matched will cause the function to return an error.


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.
Header: Declared in Winber.h.
Library: Use Wldap32.lib.

See Also

Functions, berval, BerElement, ber_init, ber_bvfree