I've sent an update to CLSHEAP, which should be posted in the next day or two. There are three new methods to the Heap class, and two new UDFs to allocate and deallocate NetAPIBuffers for use under NT with Net family API calls.
The new methods are:
AllocBLOB(cExpression) - allocates a buffer the size of the string expression passed as a parameter, and copies the content to the buffer.
AllocString(cExpression) - allocates a buffer 1 byte bigger than the character expression passed as a parameter, and copies the content to the buffer, followedby a trailing null (CHR(0))
AllocInitAs(nSize,nValue) - allocates a buffer of nSize bytes and initializes it to be filled with CHR(nValue)
The two new UDFs are:
AllocNetAPIBuffer(nSize) - creates a NetAPIBuffer of at least nSize bytes. It returns an integer pointer to the buffer, or NULL if the allocation fails. NT only.
DeAllocNetAPIBuffer(nPointer) - frees the netAPIBuffer allocated at the address nPointer. Returns .T. or .F.