 |
GlobalReAlloc ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Changes the size or attributes of a specified global memory object. The size can increase or decrease. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
HGLOBAL GlobalReAlloc(
HGLOBAL hMem,
SIZE_T dwBytes,
UINT uFlags
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER GlobalReAlloc IN kernel32;
INTEGER hMem,;
LONG dwBytes,;
LONG uFlags
|
 |
 |
 |
| Parameters: |
 |
hMem
[in] A handle to the global memory object to be reallocated. This handle is returned by either the GlobalAlloc or GlobalReAlloc function.
dwBytes
[in] The new size of the memory block, in bytes. If uFlags specifies GMEM_MODIFY, this parameter is ignored.
uFlags
[in] The reallocation options. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is a handle to the reallocated memory object, otherwise it is NULL. |
 |
 |
| My comment: |
 |
If GlobalReAlloc reallocates a movable object, the return value is a handle to the memory object. To convert the handle to a pointer, use the GlobalLock function.
If GlobalReAlloc reallocates a fixed object, the value of the handle returned is the address of the first byte of the memory block. To access the memory, a process can simply cast the return value to a pointer.
|
 |
 |
| Word Index links for the GlobalReAlloc : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2006-04-26 12:32:29 | | Modified: | 2006-04-26 12:34:31 | Visited in last 7 days: 18 |