Since i am now programming in both 32 and 64-bit, there is something i would like to share with you about 64-bit.
While most of the common API structure TYPE are still the same in 64-bit, a few are using 8-byte alignment rather than 4-byte, causing major havoc if you are not aware of this.
While this is not a problem for those using C or C++, this could be much of an issue if ever there is a 64-bit version of PowerBASIC.
Let's take an example :
The BITMAP structure is using a size of 28-byte in 32-bit, but a size of 32-byte in 64.
This has a direct impact on the bm.bmBits pointer, especially when dealing with the GetObjectA API.
So always use first GetObjectA with a null pointer to retrieve the correct size to use, or your code won't work anymore and you will not understand why.
While most of the common API structure TYPE are still the same in 64-bit, a few are using 8-byte alignment rather than 4-byte, causing major havoc if you are not aware of this.
While this is not a problem for those using C or C++, this could be much of an issue if ever there is a 64-bit version of PowerBASIC.
Let's take an example :
The BITMAP structure is using a size of 28-byte in 32-bit, but a size of 32-byte in 64.
This has a direct impact on the bm.bmBits pointer, especially when dealing with the GetObjectA API.
So always use first GetObjectA with a null pointer to retrieve the correct size to use, or your code won't work anymore and you will not understand why.

Comment