Memory Allocation
EHLLAPI functions do not allocate or free memory. The application
program must preallocate buffer space for EHLLAPI functions which
require it before calling the hllapi entry point.
The buffer space may be pre-allocated as a dynamic variable such as:
struct HLDQuerySessionStatus QueryBuff;
or it may be allocated by a call to a C library or operating system
function such as:
struct HLDQuerySessionStatus *QueryBuff;
...
QueryBuff = malloc(sizeof(struct HLDQuerySessionStatus));
In any case, the application is responsible for allocating sufficient buffer space before calling EHLLAPI functions and for freeing buffers when they are not needed.