{{page>en:templates:win16api}} ====== LocalSize ====== ==== Brief ==== Returns the current size (in bytes) of a local memory object. ==== Syntax ==== UINT WINAPI LocalSize( HLOCAL hMem ); ==== Parameters ==== hMem – Handle to the memory object. ==== Return Value ==== Returns the size of the block, or zero if the handle is invalid or the object has been discarded. Call GetLastError for extended error information. ==== Notes ==== The returned size may be larger than the originally requested size because of internal alignment. Use LocalFlags first to check whether the block has been discarded. ==== Example Code ==== ==== C Binding ==== UINT size = LocalSize(hMem); ==== MASM Binding ==== push hMem call LocalSize ==== See also ==== * [[LocalAlloc]] * [[LocalFlags]] {{page>en:templates:win16}}