 |
HeapReAlloc ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The HeapReAlloc function reallocates a block of memory from a heap. This function enables you to resize a memory block and change other memory block properties. The allocated memory is not movable. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
LPVOID HeapReAlloc(
HANDLE hHeap, // handle to heap block
DWORD dwFlags, // heap reallocation options
LPVOID lpMem, // pointer to memory to reallocate
SIZE_T dwBytes // number of bytes to reallocate
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER HeapReAlloc IN kernel32;
INTEGER hHeap,;
INTEGER dwFlags,;
INTEGER lpMem,;
INTEGER dwBytes
|
 |
 |
 |
| Parameters: |
 |
hHeap
[in] Heap from which the memory will be reallocated. This is a handle returned by the HeapCreate or GetProcessHeap function.
dwFlags
[in] Specifies several controllable aspects of heap reallocation.
lpMem
[in] Pointer to the block of memory that the function reallocates. This pointer is returned by an earlier call to the HeapAlloc or HeapReAlloc function.
dwBytes
[in] New size of the memory block, in bytes. A memory block"s size can be increased or decreased by using this function. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is a pointer to the reallocated memory block. Otherwise the return is NULL or an exception generated if you have specified HEAP_GENERATE_EXCEPTIONS in dwFlags. |
 |
 |
| My comment: |
 |
| MSDN: If HeapReAlloc fails, the original memory is not freed, and the original handle and pointer are still valid. To free a block of memory allocated by HeapReAlloc, use the HeapFree function. |
 |
 |
| Word Index links for the HeapReAlloc : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-12-01 08:28:59 | | Modified: | 2001-12-01 08:32:58 | Visited in last 7 days: 20 |