Page 1 of 1

porting 32bit code to 64bit ?

Posted: Tue Dec 06, 2011 8:12 am
by sartic
Trying to find clear list what is different. Any url?

In theory 32bit programs are little slower than 64bit on 64bit host. 32 bit program can reach "only" 2 GB (I do not see any purpose now programming more :).

Re: porting 32bit code to 64bit ?

Posted: Tue Dec 06, 2011 9:38 am
by IdeasVacuum
Well, it's not a 'port', it's a compile. Compile your 32bit code on 64bit Windows with 64bit PB and see what happens. You may have implemented API calls and or PB Libs that are 32bit only. Your first attempt at compiling will highlight some issues if they are there.......

Re: porting 32bit code to 64bit ?

Posted: Tue Dec 06, 2011 10:57 am
by c4s
The PureBasic Team blog might give you some help and ideas:

Porting your programs to PureBasic 64bit -> http://www.purebasic.fr/blog/?p=42
Is your 64bit program really solid ? -> http://www.purebasic.fr/blog/?p=172

Re: porting 32bit code to 64bit ?

Posted: Sun Dec 11, 2011 8:25 am
by sartic
I read it but didn't understand it full. It should be more clear differences side by side.
There are even differences in 32bit programs under 64bit host. Example Sticky Window last 'till using 'normal' for window etc.

Re: porting 32bit code to 64bit ?

Posted: Sun Dec 11, 2011 9:29 pm
by IdeasVacuum
This advice from Freak is important:
Do NOT use Get/SetWindowLong_() for subclassing anymore. These remain 32bit even on x64. Use Get/SetWindowLongPtr_() instead, which works correctly everywhere. There is really no need to use SetWindowLong_() over SetWindowLongPtr_() actually, so best do a search and replace and replace all of them right away.