Page 1 of 1

Compile problem for 64 bit

Posted: Mon Oct 24, 2011 10:30 am
by ottigeda
Hi

If I try to compile one of my projects for 64 bit with Delphi XE2, I get the following 2 errors in siDialog.pas:

[DCC Error] siDialog.pas(1678): E2089 Invalid typecast
[DCC Error] siDialog.pas(1684): E2089 Invalid typecast

This 2 lines are part of procedure TsiBrowseForFolder.DoShow;

The problem seems to be that 64bit long variables are casted to LongInt which is still 32 bit:

SendMessage(FHandle, WM_SETTEXT, 0, LongInt(FDialogCaption));
SendMessage(FHandle, BFFM_SETSELECTION, LongInt(True), LongInt(FSelectedDir));

Would it be better to cast it to NativeInt? Because that is 32bit long for 32bit executables, and 64 bit long for 64 bit executables.

Best Regards
Ottiger Daniel

Posted: Mon Oct 24, 2011 3:55 pm
by isiticov
Hello,

Do you use the latest version?
Yes, there should be used NativeInt. This is already done in the latest version.

Posted: Tue Oct 25, 2011 8:59 am
by ottigeda
I use version 6.5.4.1, is this not the latest version ?

I download it again (i do not get the same binary for whatever reason).
I uninstalled it, installed it again, but the 2 lines in siDialog still have LongInt?

Am I doing something wrong?

Posted: Wed Oct 26, 2011 5:35 am
by isiticov
I'm sorry. It looks like the source file for siDialog unit was incorrect in the install package. Please re-download the setup from our web site. We've re-built the setup.