6.2 WFMAllocateMore

HRESULT WFMAllocateMore( ulSize, lpvOriginal, lppvData )

Allocates a memory buffer, linking it to an previously allocated one.

Parameters ULONG ulSize

Size (in bytes) of the memory to be allocated

LPVOID lpvOriginal

Address of the original buffer to which the newly allocated buffer should be linked

LPVOID * lppvData

Address of the variable in which the XFS Manager will place the pointer to the newly allocated memory.

Comments This function allocates an additional memory buffer and link it to one previously allocated by WFMAllocateBuffer. The returned buffer has the same properties as the previous buffer (i.e., the WFS_MEM_SHARE and WFS_MEM_ZEROINIT flags) and it can be freed only by freeing the original buffer (using WFMFreeBuffer or WFSFreeResult).

Error Codes If the function return is not WFS_SUCCESS, it is one of the following error conditions:

WFS_ERR_INVALID_ADDRESS
The lpvOriginal parameter does not point to a previously allocated buffer.
WFS_ERR_INVALID_POINTER
A pointer parameter does not point to accessible memory.
WFS_ERR_OUT_OF_MEMORY
There is not enough memory available to satisfy the request.

See also WFMAllocateBuffer, WFMFreeBuffer, WFSFreeResult and Section 3.13.