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:
Validating the heap of the calling process
HeapValidate
..msdn    Add comment     W32 Constants      Translate this page
Attempts to validate a specified heap. The function scans all the memory blocks in the heap, and verifies that the heap control structures maintained by the heap manager are in a consistent state.

You can also use the HeapValidate function to validate a single memory block within a specified heap, without checking the validity of the entire heap.
Code examples:
Validating the heap of the calling process
Declaration:
BOOL HeapValidate(
  HANDLE hHeap,  // handle to heap
  DWORD dwFlags, // heap access options 
  LPCVOID lpMem  // optional pointer to memory block
);
FoxPro declaration:
DECLARE INTEGER HeapValidate IN kernel32;
    INTEGER hHeap,;
    INTEGER dwFlags,;
    INTEGER lpMem
Parameters:
hHeap
[in] Handle to the heap of interest. The HeapValidate function attempts to validate this heap, or a single memory block within this heap.

dwFlags
[in] Specifies heap access during function operation.

lpMem
[in] Pointer to a memory block within the specified heap. This parameter may be NULL.
If this parameter is NULL, the function attempts to validate the entire heap specified by hHeap.
Return value:
If the specified heap or memory block is valid, the return value is nonzero.
My comment:
The HeapValidate function does not set the thread"s last error value. There is no extended error information for this function; do not call GetLastError.

HeapValidate can only validate allocated memory blocks. Calling HeapValidate on a freed memory block will return FALSE because there are no control structures to validate.

If you want to validate the heap elements enumerated by the HeapWalk function, you should only call HeapValidate on the elements that have PROCESS_HEAP_ENTRY_BUSY in the wFlags member of the PROCESS_HEAP_ENTRY structure. HeapValidate returns FALSE for all heap elements that do not have this bit set.
Word Index links for the HeapValidate :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-12-01 08:47:01
Modified: 2001-12-01 08:50:36
Visited in last 7 days: 21
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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.91.38.173)
14 sec.Function: 'WinExec'
26 sec.Function: 'GetUserGeoID'
39 sec.Function: 'CeCreateProcess'
52 sec.Function: 'GetConsoleScreenBufferInfo'
1.07 min.Function: 'GetCursorPos'
1.28 min.Function: 'GdipMeasureString'
1.52 min.
Function group: 'GDI+ StringFormat'
1.73 min.Function: 'CeReadFile'
1.97 min.Function: 'GetProductInfo'
2.22 min.Function: 'SetFocus'
Google
Advertise here!