I was trying to find a simple way of writing the contents of arrays ( of simple datatypes only, no objects! ) to disk and reading them back in again.
I'm using CreateStaticBank() and passing the pointer as VarPtr(MyArray[0]) or VarPtr(MyArray[0,0]) depending on the number of dimensions and then a bank size of 4* the total number of elements in the array. Then just Bank.Save() to write to disk.
But I'm just getting a file of zeros, so it looks like I can't create a static bank like this. I was surprised because I actually thought that arrays of simple datatypes like ints and floats were written in blocks of contiguous memory, but now I'm wondering if perhaps that only applies to one dimensions arrays.
Is there no easy way to do it?
I'm using CreateStaticBank() and passing the pointer as VarPtr(MyArray[0]) or VarPtr(MyArray[0,0]) depending on the number of dimensions and then a bank size of 4* the total number of elements in the array. Then just Bank.Save() to write to disk.
But I'm just getting a file of zeros, so it looks like I can't create a static bank like this. I was surprised because I actually thought that arrays of simple datatypes like ints and floats were written in blocks of contiguous memory, but now I'm wondering if perhaps that only applies to one dimensions arrays.
Is there no easy way to do it?