WsCreateHeap function (webservices.h)
Creates a heap object.
HRESULT WsCreateHeap( SIZE_T maxSize, SIZE_T trimSize, const WS_HEAP_PROPERTY *properties, ULONG propertyCount, WS_HEAP **heap, WS_ERROR *error );
The total number of bytes that can be allocated from the heap. The total number of bytes is defined as sum of the sizes passed in all the calls to the WsAlloc function since the heap was created or reset.
The maximum number of bytes of memory that the heap retains after the heap has been reset by a call to the WsResetHeap function. This is an approximation value due to heap overhead.
Reserved for future use; set to NULL.
Reserved for future use; set to 0 (zero).
On success, pointer that receives the address of the WS_HEAP structure representing the new heap object.
Pointer to a WS_ERROR structure that receives additional error information if the function fails.
If the function succeeds, it returns NO_ERROR; otherwise, it returns an HRESULT error code.
A heap in Windows Web Services API is a memory allocation used for messages. Heaps can also be used to store message data separately from the lifetime of a message. Some API functions allow for explicit heap control over the lifetime of any data read.
Creating new heap does not allocate any memory (except the memory necessary for WS_HEAP structure itself). The parameters maxSize and trimSize are used as quotas onlyduring WsAlloc and WsResetHeap operations.
|Minimum supported client||Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps | UWP apps]|