This function returns the current size, in bytes, of the specified local memory object.
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.