Of wvido...@metsec.com
> Sent: Monday, August 23, 2010 12:41 AM
> To: delphi@elists.org
> Subject: RE: Error reading Binary files using Delphi2006
>
>
>
> Yes, the record is not defined as PACKED but in the compiler
> option for
> D5 the Align Record Fields option is c
.
-Original Message-
From: delphi-boun...@elists.org [mailto:delphi-boun...@elists.org] On
Behalf Of wvido...@metsec.com
Sent: 23 August 2010 08:41
To: delphi@elists.org
Subject: RE: Error reading Binary files using Delphi2006
Yes, the record is not defined as PACKED but in the compiler option for
D5
-boun...@elists.org [mailto:delphi-boun...@elists.org] On
Behalf Of Richard Saunders
Sent: 21 August 2010 13:58
To: delphi@elists.org
Subject: Re: Error reading Binary files using Delphi2006
On 8/20/2010 11:32 AM, wvido...@metsec.com wrote:
> I wrote an application using delphi5 which reads
William,
Though I don't have the specific answer, note that newer versions of Delphi use
multi-byte Strings by default. Is there an option as project default to use
ANSI strings, or else set the local String variable types to AnsiString.That
might solve your problem.
Bart
From:
Subject: Error
Haven't used D 2006, so don't know all the gotchas, but perhaps the
"packed" or "$Align" defaults are different, so record definition is
packed in one version of Delphi but aligned in the other?
At 09:32 AM 8/20/2010, wvido...@metsec.com wrote:
Dear All,
I wrote an application using delphi5 w
On 8/20/2010 11:32 AM, wvido...@metsec.com wrote:
I wrote an application using delphi5 which reads and writes binary file
using TFilestream. But then when I ported the application to Delphi
2006 the files written using old application returns junk data in the
new version.
The record that is
William,
obviously the record is *not* the same, otherwises it would work.
You should check the alignment of the fields in the record.
For records to be written to disk it is always a good idea to declare them
as PACKED RECORD to avoid problems like yours.
Good luck,
Gunnar
- Original Me
7 matches
Mail list logo