HeapAlloc PROC
(MS-Windows)
Allocates a block of memory from a heap that has
already been created by a call to HeapCreate.
If the function succeeds, the return value is a
pointer to the allocated memory block.
If the function fails and you have not specified
HEAP_GENERATE_EXCEPTIONS, the return value is
NULL.
HeapAlloc PROTO,
hHeap:DWORD, ; handle to private heap block
dwFlags:DWORD, ; heap allocation control flags
dwBytes:DWORD ; number of bytes to allocate
Returns: (LPVOID) EAX = A pointer to the allocated heap,
If failure, NULL,
STATUS_NO_MEMORY, or
STATUS_ACCESS_VIOLATION
|
| Argument | Win Type | MASM Type | Description |
|---|---|---|---|
| hHeap | HANDLE | DWORD | Specifies the heap from which the memory will be allocated. |
| dwFlags | DWORD | DWORD | Heap allocation control flags - specifying any one of
these flags will override the corresponding flag specified when the
heap was created with HeapCreate. · HEAP_GENERATE_EXCEPTIONS - raise an exception, don't return NULL. · HEAP_NO_SERIALIZE - mutual exclusion will not be used when accessing the heap. · HEAP_ZERO_MEMORY - the allocated memory will be initialized to zero. |
| dwBytes | DWORD | DWORD | The number of bytes to be allocated. |
| Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |