Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Windows Mobile 6.5
A version of this page is also available for

This function returns the current size, in bytes, of the specified local memory object.

UINT LocalSize(


[in] Handle to the local memory object. This handle is returned by the LocalAlloc or LocalReAlloc function.

In the debug configuration, where heap sentinels are enabled, the return value is the exact allocation size for the heap item.

In the retail configuration, where debug information is not included, the return value is the allocation size aligned to the block size (32 bytes).

Zero indicates that the specified handle is not valid or that the object has been discarded. To get extended error information, call GetLastError.

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

Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

© 2015 Microsoft