Error Inquiry Regarding Delphi's PCANTP_2016
Posted: Thu 28. Dec 2023, 06:33
I'm trying to test PCAN-ISO TP with Delphi, but I've encountered some issues.
Software Used: Delphi 11.3, Delphi 12
I downloaded PCAN-ISO-TP.ZIP and copied the PCANBasic.pas and PCANTP_2016.pas files from the \PCAN-ISO-TP\Samples\Samples\Delphi\05_isotp_read_write folder into a new Delphi project. The project type is a Windows VCL Application.
The problem arises when I try to run the Delphi project. I'm encountering errors in PCANTP_2016.pas at lines 1024(1024:55) and 1259(1259:107) with the message 'E2026 Constant expression expected'.
line 1024 : PCANTP_STATUS_FLAG_PCAN_STATUS = UInt32($80000000),
line 1259 : PCANTP_MSGTYPE_ANY = UInt32(PCANTP_MSGTYPE_FRAME) Or UInt32(PCANTP_MSGTYPE_ISOTP) Or UInt32($FFFFFFFF));
It seems like the issue might be related to UInt32($80000000) and UInt32($FFFFFFFF). Is there a way to resolve this problem?
I'm also curious whether the problem persists if I copy only the PCANBasic.pas and PCANTP_2016.pas files into a new Delphi project.
Software Used: Delphi 11.3, Delphi 12
I downloaded PCAN-ISO-TP.ZIP and copied the PCANBasic.pas and PCANTP_2016.pas files from the \PCAN-ISO-TP\Samples\Samples\Delphi\05_isotp_read_write folder into a new Delphi project. The project type is a Windows VCL Application.
The problem arises when I try to run the Delphi project. I'm encountering errors in PCANTP_2016.pas at lines 1024(1024:55) and 1259(1259:107) with the message 'E2026 Constant expression expected'.
line 1024 : PCANTP_STATUS_FLAG_PCAN_STATUS = UInt32($80000000),
line 1259 : PCANTP_MSGTYPE_ANY = UInt32(PCANTP_MSGTYPE_FRAME) Or UInt32(PCANTP_MSGTYPE_ISOTP) Or UInt32($FFFFFFFF));
It seems like the issue might be related to UInt32($80000000) and UInt32($FFFFFFFF). Is there a way to resolve this problem?
I'm also curious whether the problem persists if I copy only the PCANBasic.pas and PCANTP_2016.pas files into a new Delphi project.