Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.37 KB

LocalAlloc.md

File metadata and controls

58 lines (40 loc) · 1.37 KB

Home

Function name : LocalAlloc

Group: Memory Management - Library: kernel32


The LocalAlloc function allocates the specified number of bytes from the heap.


Code examples:

Creating a folder
Retrieving local computer and user names
Retrieving the name of the default printer for the current user on the local computer (Win NT/XP)
Pocket PC: base class
Encapsulating access to the Windows Services in a class
Reading security permissions for NTFS files and folders

Declaration:

HLOCAL LocalAlloc(
  UINT uFlags,
  SIZE_T uBytes
);  

FoxPro declaration:

DECLARE INTEGER LocalAlloc IN kernel32;
	INTEGER uFlags,;
	INTEGER uBytes
  

Parameters:

uFlags [in] Memory allocation attributes.

uBytes [in] Number of bytes to allocate.


Return value:

If the function succeeds, the return value is a handle to the newly allocated memory object.


Comments:

Windows memory management does not provide a separate local heap and global heap.