Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BMP File format
#7
I may have found a problem. I'm running this in QB64 3.14 x64 IDE and using ConvertOffset, then this error appears. The solution is to change "Dim offsetTarget as LONG" to "Dim offsetTarget as _Offset" in line 297 and then run the loader as expected.
This is also the reason why I didn't find the error. In 32-bit system, 32-bit values are used to allocate memory. The Long type is 32-bit and therefore in IDE32 it is sufficient and the error does not occur. When the program is run in IDE64, 64-bit values are used to address memory, so the LONG data type overflows and this error occurs. The _Offset data type solves this, in 32-bit IDE it is 4 bytes long and in 64-bit system it is 8 bytes long. I assume that changing the data type will solve it. I'm attaching the image that caused the error (as I did it in the 64-bit IDE in QB64PE 3.14 using the convertoffset function (in Steve's last post in his thread).

Both latest source codes updated. Changed data type to _Offset.


Attached Files Image(s)
   


Reply


Messages In This Thread
BMP File format - by Petr - 02-17-2025, 09:39 PM
RE: BMP File format - by Petr - 02-20-2025, 09:45 PM
RE: BMP File format - by Petr - Yesterday, 01:01 PM
RE: BMP File format - by Steffan-68 - Today, 10:11 AM
RE: BMP File format - by Petr - Today, 11:29 AM
RE: BMP File format - by SMcNeill - 11 hours ago
RE: BMP File format - by Petr - 11 hours ago
RE: BMP File format - by Steffan-68 - 11 hours ago
RE: BMP File format - by Petr - 3 hours ago



Users browsing this thread: 3 Guest(s)