SetHandleSize
int SetHandleSize (Handle handle, size_t newSize);
Purpose
This function changes the size of the memory block refered to by a handle. If the new block is larger than the current block then all of the current data in the block is preserved and the new portion of the block is filled with zeros. If the new block is smaller than the current block then as much of the data in the current block that can fit in the new block is preserved and the rest of the data is discarded.
Parameters
Input | ||
Name | Type | Description |
handle | Handle | The handle whose memory block size will be changed. |
newSize | size_t | The new size (in bytes) for the memory block referred to by the handle. |
Return Value
Name | Type | Description |
result | int | Returns 1 (TRUE) if the size was set. Returns 0 (FALSE) if there was not enough memory to change the size. |
Additional Information
Library: Programmer's Toolbox
Include file: toolbox\toolbox.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later