Directory Services

ber_flatten

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
);

Parameters

pBerElement
[in] Pointer to the source BerElement structure.
pBerVal
[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.

Remarks

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.

Requirements

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