| Method Prototype | Description
|
| Function BooleanValue( offset As Integer ) As Boolean | interpret a byte as true (nonzero) or false (0)
|
| Sub BooleanValue( offset As Integer, Assigns newValue As Boolean ) | set a byte as true (1) or false (0)
|
| Function Byte( offset As Integer ) As Integer | get a byte as a value 0-255 (same as UInt8Value)
|
| Sub Byte( offset As Integer, Assigns newValue As Integer ) | set a byte as a value 0-255 (same as UInt8Value)
|
| Function ColorValue( offset As Integer, bits As Integer ) As Color | get a 16, 24, or 32-bit color
|
| Sub ColorValue( offset As Integer, bits As Integer, Assigns newValue As Color ) | set a 16, 24, or 32-bit color
|
| Sub Constructor( size As Integer ) | initialize to the given number of bytes
|
| Function CString( offset As Integer ) As String | return the null-terminated string starting at offset
|
| Sub CString( offset As Integer, Assigns newValue As String ) | store the given string, followed by a null
|
| Function CurrencyValue( offset As Integer ) As Currency | get a 4-byte currency value
|
| Sub CurrencyValue( offset As Integer, Assigns newValue As Currency ) | set a 4-byte currency value
|
| Function DoubleValue( offset As Integer ) As Double | get an 8-byte floating-point value
|
| Sub DoubleValue( offset As Integer, Assigns newValue As Double ) | set an 8-byte floating-point value
|
| Function Int16Value( offset As Integer ) As Int16 | get a 2-byte signed integer
|
| Sub Int16Value( offset As Integer, Assigns newValue As Int16 ) | set a 2-byte signed integer
|
| Function Int32Value( offset As Integer ) As Int32 | get a 4-byte signed integer
|
| Sub Int32Value( offset As Integer, Assigns newValue As Int32 ) | set a 4-byte signed integer
|
| Function Int64Value( offset As Integer ) As Int64 | get an 8-byte signed integer
|
| Sub Int64Value( offset As Integer, Assigns newValue As Int64 ) | set an 8-byte signed integer
|
| Function Int8Value( offset As Integer ) As Int8 | get a 1-byte signed integer
|
| Sub Int8Value( offset As Integer, Assigns newValue As Int8 ) | set a 1-byte signed integer
|
| Function LeftB( bytes As Integer ) As MemoryBlock | get a new MemoryBlock copying the leftmost portion of this one
|
| Function LittleEndian() As Boolean | get whether integers and colors are interpreted in little-endian format
|
| Sub LittleEndian ( Assigns newValue As Boolean ) | set whether integers and colors are interpreted in little-endian format
|
| Function Long( offset As Integer ) As Integer | same as Int32Value
|
| Sub Long( offset As Integer, Assigns newValue As Integer ) | same as Int32Value
|
| Function MidB( offset As Integer, length As Integer = 0 ) As Integer | get a new MemoryBlock copying the given portion of this one
|
| Function PString( offset As Integer ) As String | get a Pascal (length-prefixed) string at the given location
|
| Sub PString( offset As Integer, Assigns newValue As String ) | store a length byte followed by the text of the given string
|
| Function RightB( bytes As Integer ) As Integer | get a new MemoryBlock copying the rightmost portion of this one
|
| Function Short( offset As Integer ) As Integer | same as Int16Value
|
| Sub Short( offset As Integer, Assigns newValue As Integer ) | same as Int16Value
|
| Function SingleValue( offset As Integer ) As Double | get a 4-byte floating-point value
|
| Sub SingleValue( offset As Integer, Assigns newValue As Double ) | set a 4-byte floating-point value
|
| Sub Size ( Assigns newValue As Integer ) | get the number of bytes in this MemoryBlock
|
| Function Size() As Integer | set the number of bytes in this MemoryBlock, truncating or expanding as needed
|
| Function StringValue( offset As Integer, length As Integer ) As String | get a string of bytes
|
| Sub StringValue( offset As Integer, length As Integer, Assigns newValue As String ) | store a string of bytes
|
| Function UInt16Value( offset As Integer ) As UInt16 | get a 2-byte unsigned integer
|
| Sub UInt16Value( offset As Integer, Assigns newValue As UInt16 ) | set a 2-byte unsigned integer
|
| Function UInt32Value( offset As Integer ) As UInt32 | get a 4-byte unsigned integer
|
| Sub UInt32Value( offset As Integer, Assigns newValue As UInt32 ) | set a 4-byte unsigned integer
|
| Function UInt64Value( offset As Integer ) As UInt64 | get an 8-byte unsigned integer
|
| Sub UInt64Value( offset As Integer, Assigns newValue As UInt64 ) | set an 8-byte unsigned integer
|
| Function UInt8Value( offset As Integer ) As UInt8 | get a 1-byte unsigned integer
|
| Sub UInt8Value( offset As Integer, Assigns newValue As UInt8 ) | set a 1-byte unsigned integer
|
| Function UShort( offset As Integer ) As Integer | same as UInt16Value
|
| Sub UShort( offset As Integer, Assigns newValue As Integer ) | same as UInt16Value
|
| Function WString( offset As Integer ) As String | get a null-terminated UTF-16 string
|
| Sub WString( offset As Integer, Assigns newValue As String ) | store a null-terminated UTF-16 string
|
The MemoryBlock class represents a chunk of memory, and provides accessors to store and retrieve binary data within that chunk in a variety of ways.
MemoryBlocks can be resized (by assigning to Size), and their contents will be preserved (as much as will fit in the new size). A new MemoryBlock, or the extra space allocated when the size is increased, is initialized to all null (zero) bytes.