GetProcessHeap PROC
(MS-Windows)
Gets a handle to the heap of the calling
process.
Use this handle with HeapAlloc, HeapReAlloc,
HeapFree, and HeapSize.
Call GetLastError to get extended error
information.
GetProcessHeap PROTO, ; get the current process heap handle Returns: (HANDLE) EAX = Handle to the calling process's heap, NULL if the function fails. |
Note: GetProcessHeap allows you to allocate memory from the process heap without invoking HeapCreate first (by invoking HeapAlloc).
Example: .data hHeapProc DWORD ? dwBytes DWORD 1000 ;bytes to allocate hHeapBlock DWORD ? .code INVOKE GetProcessHeap mov hHeapProc,eax ;save handle to process heap INVOKE HeapAlloc, hHeapProc, ;handle to process heap 0, dwBytes mov hHeapBlock,eax ;save handle to allocated block from heap
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |