MemoryBlock.Size
From Xojo Documentation
Property (As Integer )
aMemoryBlock.Size = newIntegerValue
or
IntegerValue = aMemoryBlock.Size
Supported for all project types and targets.
or
IntegerValue = aMemoryBlock.Size
Supported for all project types and targets.
The size of the MemoryBlock in bytes.
Notes
If you assign a value to this property, the 'MemoryBlock is resized', retaining as much of the existing data as possible.
MemoryBlock has a class constant, SizeUnknown (Integer), whose value is -1. Size returns SizeUnknown when the MemoryBlock is of unknown size. You can get this condition with Declare statements. Also, Ptr returns a MemoryBlock with an unspecified, so it sets Size to -1; however, the MemoryBlock can still be used to access the data that is stored in the MemoryBlock.