Access/VBA Library

GlobalAlloc

Allocates the specified number of bytes from the heap.

See also: https://msdn.microsoft.com/en-us/library/windows/desktop/aa366574(v=vs.85).aspx

Syntax

GlobalAlloc( wFlags, dwBytes )
Parameters
Name Type Description
wFlags Long Required. The memory allocation attributes. See api documentation for more info.
dwBytes Long Required. The number of bytes to allocate.
Return value

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

Code
Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long

See also

  • CopyStringToClipboard