ber_alloc_t function (winber.h)
The ber_alloc_t function allocates and constructs a new BerElement structure.
Syntax
WINBERAPI BerElement *BERAPI ber_alloc_t(
[in] INT options
);
Parameters
[in] options
A bitwise OR of the options used to generate the encoding or decoding of the BerElement. 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 the function succeeds, the return value is a pointer to the newly allocated BerElement structure.
If the 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, so these functions are not sufficient for generating DER output as defined in X.509 and X.680. If the caller handles ordering values of sets correctly and removing default values, DER output as defined in X.509 and X.680 can be produced.
The allocated BerElement should be freed with ber_free.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | winber.h |
Library | Wldap32.lib |
DLL | Wldap32.dll |