Allocate virtual memory.
Syntax:
_vGrab(<nBytes>) -> <hPointer>
_vGrab(<cSrc>, @<nGetSize>) -> <hPointer>
Parameters:
<nBytes>
Number of bytes to alloc. Memory will be filled with Chr(0)
<cSrc>
If a string is provided as the first parameter, this function will alloc (Len(<cSrc>)+1) bytes and copy the content of <cSrc> to the new created memory buffer.
<nGetSize>
If the first parameter is a string this parameter will retrieve the length of the provided string.Must be passed by reference.
Return Value:
Pointer of the new allocated memory buffer.
Remarks:
All the memory pointers allocated with _vGrab() must be released only with _vFree(). _vGrab() memory NOT be automatically released at the end of the instance.
_vGrab() allow you to manage virtual memory easily, for special needs probably you will use directly the Windows API virtual memory functions.