Skip to content

Latest commit

 

History

History
104 lines (75 loc) · 3.28 KB

nf-winbase-localsize.md

File metadata and controls

104 lines (75 loc) · 3.28 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winbase.LocalSize
LocalSize function (winbase.h)
Retrieves the current size of the specified local memory object, in bytes.
LocalSize
LocalSize function
_win32_localsize
base.localsize
winbase/LocalSize
base\localsize.htm
base
d1337845-d89c-4cd5-a584-36fe0c682c1a
12/05/2018
LocalSize, LocalSize function, _win32_localsize, base.localsize, winbase/LocalSize
winbase.h
Windows.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Kernel32.lib
Kernel32.dll
Windows
19H1
LocalSize
winbase/LocalSize
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-Heap-Obsolete-l1-1-0.dll
kernel32legacy.dll
API-MS-Win-DownLevel-Kernel32-l2-1-0.dll
LocalSize

LocalSize function

-description

Retrieves the current size of the specified local memory object, in bytes.

Note  The local functions have greater overhead and provide fewer features than other memory management functions. New applications should use the heap functions unless documentation states that a local function should be used. For more information, see Global and Local Functions.
 

-parameters

-param hMem [in]

A handle to the local memory object. This handle is returned by the LocalAlloc, LocalReAlloc, or LocalHandle function.

-returns

If the function succeeds, the return value is the size of the specified local memory object, in bytes. If the specified handle is not valid or if the object has been discarded, the return value is zero. To get extended error information, call GetLastError.

-remarks

The size of a memory block may be larger than the size requested when the memory was allocated.

To verify that the specified object's memory block has not been discarded, call the LocalFlags function before calling LocalSize.

-see-also

Global and Local Functions

LocalAlloc

LocalFlags

LocalHandle

LocalReAlloc

Memory Management Functions