Platform SDK: DLLs, Processes, and Threads

WOWGlobalAlloc16

The WOWGlobalAlloc16 function allocates the specified number of bytes from the 16-bit global heap. This function can only be called in the context of a thunk.

WORD WINAPI WOWGlobalAlloc16(
  WORD wFlags,  // object allocation attributes
  DWORD cb      // number of bytes to allocate
);

Parameters

wFlags
[in] Specifies how to allocate memory. This parameter can be one or more of the following values.
GHND GMEM_NODISCARD
GMEM_DDESHARE GMEM_NOT_BANKED
GMEM_DISCARDABLE GMEM_NOTIFY
GMEM_FIXED GMEM_SHARE
GMEM_LOWER GMEM_ZEROINIT
GMEM_MOVEABLE GPTR
GMEM_NOCOMPACT

cb
[in] Specifies the number of bytes to allocate.

Return Values

Returns the handle of the newly allocated memory object if successful. Otherwise, returns NULL.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Wownt32.h.
  Library: Included as a resource in Wow32.dll.

See Also

Generic Thunks Overview, 32-bit Generic Thunk Functions, WOWGlobalLock16