ber_alloc_t (Compact 2013)

3/26/2014

This function allocates and constructs a new BerElement structure.

Syntax

BerElement* ber_alloc_t(
  INT iOptions
);

Parameters

  • iOptions
    [in] Bitwise OR of the options that are to be used when generating the encoding or decoding of the BerElement structure. The LBER_USE_DER flag (0x01) should always be specified, which causes the element lengths to be encoded in the minimum number of octets. Unrecognized option bits are ignored.

Return Value

If this function succeeds, the return value is a pointer to the newly allocated BerElement.

If this function fails, it returns a NULL pointer.

Remarks

The LBER_USE_DER option does not cause values of sets to be rearranged in tag and byte order or default values to be removed. As a result these functions are not sufficient for generating DER output as defined in X.509 and X.680. If the caller takes responsibility for ordering values of sets correctly and removing default values, DER output as defined in X.509 and X.680 can be produced.

Requirements

Header

winber.h

Library

wldap32.lib

See Also

Reference

Other LDAP Functions
BerElement