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
HeapAlloc
..msdn    Add comment     W32 Constants      Translate this page
The HeapAlloc function allocates a block of memory from a heap. The allocated memory is not movable.
Code examples:
Using the heap of the calling process to allocate memory blocks
Declaration:
LPVOID HeapAlloc(
  HANDLE hHeap,   // handle to private heap block
  DWORD dwFlags,  // heap allocation control
  SIZE_T dwBytes  // number of bytes to allocate
);
FoxPro declaration:
DECLARE INTEGER HeapAlloc IN kernel32;
    INTEGER hHeap,;
    INTEGER dwFlags,;
    INTEGER dwBytes
Parameters:
hHeap
[in] Specifies the heap from which the memory will be allocated. This parameter is a handle returned by the HeapCreate or GetProcessHeap function.

dwFlags
[in] Specifies several controllable aspects of heap allocation. Specifying any of these values will override the corresponding value specified when the heap was created with HeapCreate.

dwBytes
[in] Specifies the number of bytes to be allocated.
Return value:
If the function succeeds, the return value is a pointer to the allocated memory block. If the function fails the return value is NULL or an exception generated if you have specified HEAP_GENERATE_EXCEPTIONS in dwFlags.
My comment:
MSDN: To determine the actual size of the allocated block, use the HeapSize function. To free a block of memory allocated by HeapAlloc, use the HeapFree function. Memory allocated by HeapAlloc is not movable. Since the memory is not movable, it is possible for the heap to become fragmented.
Word Index links for the HeapAlloc :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-12-01 08:17:43
Modified: 2001-12-01 08:21:58
Visited in last 7 days: 18
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.81.178.153)
13 sec.Function: 'RasEnumAutodialAddresses'
24 sec.Function: 'CreateEnhMetaFile'
36 sec.Function: 'WinExec'
48 sec.Function: 'GetVolumeInformation'
1.03 min.Function: 'StrTrim'
1.23 min.
1.43 min.
Function group: 'Event Logging'
1.63 min.Function: 'CeRapiInvoke'
1.82 min.Function: 'IsChild'
2.02 min.Function: 'WNetConnectionDialog1'
Google
Advertise here!