Using Win32 functions in Visual FoxPro Image Gallery
Memory Management
..msdn
CopyMemory
FillMemory
GetProcessHeap
GetProcessHeaps
GlobalAlloc
GlobalFree
GlobalLock
GlobalMemoryStatus
GlobalReAlloc
GlobalSize
GlobalUnlock
HeapAlloc
HeapCompact
HeapFree
HeapLock
HeapReAlloc
HeapSize
HeapUnlock
HeapValidate
HeapWalk
LocalAlloc
LocalFree
LocalSize
VirtualAllocEx
VirtualFreeEx
ZeroMemory
Code examples:
Using the heap of the calling process to allocate memory blocks
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:
Using the heap of the calling process to allocate memory blocks
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-12-01 08:28:59
Modified: 2001-12-01 08:32:58
Visited in last 7 days: 16
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Google
Advertise here!