Why does this work fine in Delphi 2009, but not in Delphi 2010

I've been racking my head trying to figure this out and can't understand what is wrong, TFileStream.ReadComponentRes fails when I try to read a component containing a record, it works fine in Delphi 2009 and Delphi 2007, but fails with Delphi 2010

Here is the unit source and DFM

*+//UnitSource+*

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
   TThresholdMode = (tm0,tm1,tm2,tm3,tm4,tm5);
   TThreshold =  Record
      Mode:TThresholdMode;
      Filter,Start,Stop:Integer;
   end;
   TTextOffset = record
      Left,
      Top : Integer;
      Angle : Double;
      bAbsolute,
      Outline : Boolean;
   end;


  TMyObject = class( TGraphicControl )
  private
    FThreshold:TThreshold;
    FTextOffset:TTextOffset;
    procedure ReadTextOffset(Reader: TReader);
    procedure ReadThreshold(Reader: TReader);
    procedure WriteTextOffset(Writer: TWriter);
    procedure WriteThreshold(Writer: TWriter);
    { Private declarations }
  protected
     procedure DefineProperties(Filer: TFiler); override;
  published
    property Threshold:TThreshold read FThreshold write FThreshold;
    property TextOffset:TTextOffset read FTextOffset write FTextOffset;
  end;

  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
  private
    { Private declarations }
    MyObject:TMyObject;
  public
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

{ TMyObject }

procedure TMyObject.DefineProperties(Filer: TFiler);
begin
  inherited;
  Filer.DefineProperty('Threshold', ReadThreshold, WriteThreshold, True);
  Filer.DefineProperty('TextOffset', ReadTextOffset, WriteTextOffset, True);
end;

procedure TMyObject.ReadThreshold(Reader: TReader);
begin
   Reader.ReadListBegin;
   FThreshold.Mode := TThresholdMode(Reader.ReadInteger);
   FThreshold.Filter := Reader.ReadInteger;
   FThreshold.Start := Reader.ReadInteger;
   FThreshold.Stop := Reader.ReadInteger;
   Reader.ReadListEnd;
end;

procedure TMyObject.WriteThreshold(Writer: TWriter);
begin
   Writer.WriteListBegin;
   Writer.WriteInteger(Integer(FThreshold.Mode));
   Writer.WriteInteger(FThreshold.Filter);
   Writer.WriteInteger(FThreshold.Start);
   Writer.WriteInteger(FThreshold.Stop);
   Writer.WriteListEnd;
end;

procedure TMyObject.ReadTextOffset(Reader: TReader);
begin
   Reader.ReadListBegin;
   FTextOffset.Left := Reader.ReadInteger;
   FTextOffset.Top := Reader.ReadInteger;
   FTextOffset.Angle := Reader.ReadFloat;
   FTextOffset.bAbsolute := Reader.ReadBoolean;
   FTextOffset.Outline := Reader.ReadBoolean;
   Reader.ReadListEnd;
end;

procedure TMyObject.WriteTextOffset(Writer: TWriter);
begin
   Writer.WriteListBegin;
   Writer.WriteInteger(FTextOffset.Left);
   Writer.WriteInteger(FTextOffset.Top);
   Writer.WriteFloat(FTextOffset.Angle);
   Writer.WriteBoolean(FTextOffset.bAbsolute);
   Writer.WriteBoolean(FTextOffset.Outline);
   Writer.WriteListEnd;
end;


procedure TForm1.Button1Click(Sender: TObject);
var
   ProjStream , TxtStream : TFileStream;
   iPos:Integer;
begin
   TxtStream := TFileStream.Create('1.Txt' , fmCreate );
   ProjStream := TFileStream.Create('1.Bin' , fmCreate );
   try
      iPos := ProjStream.Position;
      ProjStream.WriteComponentRes( MyObject.Name ,MyObject );
      ProjStream.Seek( iPos , soFromBeginning );
      ObjectResourceToText( ProjStream , TxtStream );
   finally
      if ProjStream <> nil then ProjStream.Free;
      if TxtStream <> nil then TxtStream.Free;
   end;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
   ProjStream , TxtStream : TFileStream;
   iPos:Integer;
begin
   TxtStream := TFileStream.Create('1.Txt' , fmOpenReadWrite );
   ProjStream := TFileStream.Create('1.Bin' , fmCreate );
   try
      iPos := ProjStream.Position;
      ObjectTextToResource( TxtStream , ProjStream );
      ProjStream.Seek( iPos , soFromBeginning );
      ProjStream.ReadComponentRes( MyObject );
   finally
      if ProjStream <> nil then ProjStream.Free;
      if TxtStream <> nil then TxtStream.Free;
   end;
end;

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
   MyObject.Free;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
    MyObject := TMyObject.Create(Self);
end;

end.


+*//DFM Starts Here*+

object Form1: TForm1
  Left = 0
  Top = 0
  Caption = 'Form1'
  ClientHeight = 254
  ClientWidth = 480
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  OnCloseQuery = FormCloseQuery
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 48
    Top = 208
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Button2: TButton
    Left = 336
    Top = 208
    Width = 75
    Height = 25
    Caption = 'Button2'
    TabOrder = 1
    OnClick = Button2Click
  end
end
0
Wayne
9/11/2009 3:04:21 PM
embarcadero.delphi.rtl 934 articles. 0 followers. Follow

26 Replies
1526 Views

Similar Articles

[PageSpeed] 23

On Fri, 11 Sep 2009 08:04:21 -0700, Wayne Davis wrote:

> I've been racking my head trying to figure this out and can't
> understand what is wrong, TFileStream.ReadComponentRes fails when I
> try to read a component containing a record, it works fine in
> Delphi 2009 and Delphi 2007, but fails with Delphi 2010

This is going to be a lot of easier if you tell us how it fails? There
are so many things that could happen: nothing , bad data, errors ...

-- 
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
0
Marc
9/11/2009 6:45:35 PM
Could it be changes in WITH - it works differently now in some cases.

Warren
0
Warren
9/11/2009 6:58:10 PM
> {quote:title=Marc Rohloff wrote:}{quote}
> On Fri, 11 Sep 2009 08:04:21 -0700, Wayne Davis wrote:
> 
> > I've been racking my head trying to figure this out and can't
> > understand what is wrong, TFileStream.ReadComponentRes fails when I
> > try to read a component containing a record, it works fine in
> > Delphi 2009 and Delphi 2007, but fails with Delphi 2010
> 
> This is going to be a lot of easier if you tell us how it fails? There
> are so many things that could happen: nothing , bad data, errors ...
> 
> -- 
> Marc Rohloff [TeamB]
> marc -at- marc rohloff -dot- com


If you build a simple application with this form and press Button1 to save the component to a file, then press Button2 to read the component back in  TFileStream.ReadComponentRes fails trying to read the Records back in with Delphi 2010, but it functions fine with Delphi 2007 and Delphi 2009.
0
Wayne
9/11/2009 8:11:01 PM
Wayne Davis wrote:

> I've been racking my head trying to figure this out and can't
> understand what is wrong, TFileStream.ReadComponentRes fails when I
> try to read a component containing a record, it works fine in Delphi
> 2009 and Delphi 2007, but fails with Delphi 2010

Probably because of a dire needed bugfix finally made in D2010:

http://docwiki.embarcadero.com/RADStudio/en/Declarations_and_Statements#With_Statements

<<
Since a with statement requires a variable or a field to operate upon,
using it with properties can be tricky at times. A with statement
expects variables it operates on to be available by reference.

The most important things to note when you are using with:

    * You can use with on read-only properties only for reading. Trying
to modify a field in the exposed record or object results in a
compile-time error.
    * Even though the property allows write access to the field, you
still cannot use with to modify its fields.
>>


-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Love is the answer - but while you're waiting for the answer sex
 raises some pretty good questions." -- Woody Allen
0
Rudy
9/11/2009 8:21:14 PM
> {quote:title=Warren Postma wrote:}{quote}
> Could it be changes in WITH - it works differently now in some cases.
> 
> Warren

But there are no "WITH" statements in my code
0
Wayne
9/11/2009 8:21:50 PM
Wayne Davis wrote:

> > {quote:title=Warren Postma wrote:}{quote}
> > Could it be changes in WITH - it works differently now in some
> > cases.
> > 
> > Warren
> 
> But there are no "WITH" statements in my code

But perhaps you assign to fields of records returned by functions? That
would cause the same problem.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Raymond's Law of Software: Given a sufficiently large number of 
 eyeballs, all bugs are shallow." -- Eric S. Raymond
0
Rudy
9/11/2009 8:38:42 PM
On Fri, 11 Sep 2009 13:11:01 -0700, Wayne Davis wrote:

> If you build a simple application with this form and press Button1
> to save the component to a file, then press Button2 to read the
> component back in  TFileStream.ReadComponentRes fails trying to
> read the Records back in with Delphi 2010, but it functions fine
> with Delphi 2007 and Delphi 2009.

You still don't say how it fails. Does nothing happen. Does it give 
you a different value to what you expect. Do you get a runtime error? 
A compiler error?
Obviously message text and location would also help.

-- 
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
0
Marc
9/11/2009 9:24:32 PM
> You still don't say how it fails. Does nothing happen. Does it give 
> you a different value to what you expect. Do you get a runtime error? 
> A compiler error?
> Obviously message text and location would also help.
> 
> -- 
> Marc Rohloff [TeamB]
> marc -at- marc rohloff -dot- com


A Dialog pops up complaning about a *Debugger Exception Notification*   And  states Project Project1.exe raised exception call EReadError with message 'Property □ does not exist'
0
Wayne
9/11/2009 9:56:23 PM
> {quote:title=Rudy Velthuis (TeamB) wrote:}{quote}

> Probably because of a dire needed bugfix finally made in D2010:
> 
> http://docwiki.embarcadero.com/RADStudio/en/Declarations_and_Statements#With_Statements
> 
> <<
> Since a with statement requires a variable or a field to operate upon,
> using it with properties can be tricky at times. A with statement
> expects variables it operates on to be available by reference.
> 
> The most important things to note when you are using with:
> 
>     * You can use with on read-only properties only for reading. Trying
> to modify a field in the exposed record or object results in a
> compile-time error.
>     * Even though the property allows write access to the field, you
> still cannot use with to modify its fields.
> >>
> 
> 
> -- 
> Rudy Velthuis (TeamB)        http://www.teamb.com
> 

Where is this "WITH" statement coming from?  There is no WITH statement in the code.
0
Wayne
9/11/2009 10:30:38 PM
Wayne Davis wrote:

> Where is this "WITH" statement coming from?  There is no WITH
> statement in the code.

I was only guessing it was that, since that is a problem that occurs
with records and one of the few differences between D2010 and D2009
that could break code.

Or perhaps you have some conditionals in your code (or others have it
in theirs) using {$IFDEF VER200} or some such, and some pieces of code
or some properties are left out in the D2010 compiled version of the
code?

I am only guessing, since you don't give a lot of information yourself.
Anyway, properties and functions returning records are treated
differently in Delphi 2010.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Sterling's Corollary to Clarke's Law: Any sufficiently advanced
 garbage is indistinguishable from magic."
0
Rudy
9/11/2009 10:42:40 PM
Wayne Davis wrote:

> I've been racking my head trying to figure this out and can't
> understand what is wrong, TFileStream.ReadComponentRes fails when I
> try to read a component containing a record, it works fine in Delphi
> 2009 and Delphi 2007, but fails with Delphi 2010

It's looks like a bug in D2010 and IMO should be QC-ed.

Some background info:

In D2009 Classes.TReader.ReadProperty a function call to GetPropInfo()
on a record returns nil and as a result it will call DefineProperties
so that your local property reader can do its job.

In D2010 the same function call to GetPropInfo() (line: 7452) will
return PropInfo data causing it to attempt to use the internal
ReadPropValue on it, but this one does not know how to deal with this
record and basically does nothing.

Why GetPropInfo() re-acts differently in D2010 is something I haven't
completely figured out yet, but I think it is caused by records also
being stored in an internal reference list by name which enables
D2010's InternalGetPropInfo() to find it and earlier versions did not.

-- 
Pieter

"Outside of a dog, a book is man's best friend. Inside of a dog, 
 it's too dark to read." -- Groucho Marx
0
Pieter
9/11/2009 11:22:23 PM
Wayne Davis wrote:

> I've been racking my head trying to figure this out and can't
> understand what is wrong, TFileStream.ReadComponentRes fails when I
> try to read a component containing a record, it works fine in Delphi
> 2009 and Delphi 2007, but fails with Delphi 2010

I tried your code in D2010 and D2009. This looks like a bug indeed,
since both 1.txt and 1.bin are exactly the same in both versions and
look correct. The property it can't read seems to be the first element
of Threshold. It tries to read a property with name #2 (character with
ASCII 2). I have no idea where it got that.

I noticed that your ReadThreshold code is not called at all. Now that
is weird, isn't it?
-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"I'm Jewish. I don't work out. If God had wanted us to bend over, 
 He would have put diamonds on the floor." -- Joan Rivers.
0
Rudy
9/12/2009 12:00:46 AM
Rudy Velthuis (TeamB) wrote:

> Wayne Davis wrote:
> 
> > I've been racking my head trying to figure this out and can't
> > understand what is wrong, TFileStream.ReadComponentRes fails when I
> > try to read a component containing a record, it works fine in Delphi
> > 2009 and Delphi 2007, but fails with Delphi 2010
> 
> I tried your code in D2010 and D2009. This looks like a bug indeed,
> since both 1.txt and 1.bin are exactly the same in both versions and
> look correct. The property it can't read seems to be the first element
> of Threshold. 

It is more like it failed to process the start of the record structure,
starting with ".Threshold." (it should have called DefineProperties but
it didn't and then moves one to the next item in the *binary* resource
which happens to be a length specifier (2 bytes) for the first element
of that same record (instead of a true name/identifier for the next
property identifier to read).

-- 
Pieter

"The whole problem with the world is that fools and fanatics are
 always so certain of themselves, but wiser people so full of 
 doubts." -- Bertrand Russell
0
Pieter
9/12/2009 12:44:34 AM
Is there any other way to stream in or read components from files containing the text version of their resources, or is this a show stopper?
0
Wayne
9/12/2009 12:18:40 PM
> {quote:title=Wayne Davis wrote:}{quote}
> Is there any other way to stream in or read components from files containing the text version of their resources, or is this a show stopper?

> {quote:title=Wayne Davis wrote:}{quote}
> Is there any other way to stream in or read components from files containing the text version of their resources, or is this a show stopper?

I worked through this a few months back and let me tell you the same thing people told me *before* I wasted my time, but I didn't listen. Do not use the .dfm streaming system for storing the state of your applications. You *can* get it to work, it's *not* gonna' follow what you think are the *correct* ways of storing state, and you'll end up going with *something else* anyway!

It's true the streaming system is good for what it was designed, but it doesn't handle versioning well, and there are other ways of storing state that don't have the restrictive rules in place for handling a visual form editing system. Remember Delphi streaming is for a "form based system" storage. So, if you are not planning on having everything you save follow the component with sub-components listed in the Components property approach, don't use the streaming system.

It appears you had things working well in the past, but now it's broken. That was the biggest reason people told me not to use the .dfm streaming system, it always finds a way to break.

Either use your own binary/text format or use XML.
0
Rich
9/12/2009 2:22:04 PM
Pieter Zijlstra wrote:

> Rudy Velthuis (TeamB) wrote:
> 
> > Wayne Davis wrote:
> > 
> > > I've been racking my head trying to figure this out and can't
> > > understand what is wrong, TFileStream.ReadComponentRes fails when
> > > I try to read a component containing a record, it works fine in
> > > Delphi 2009 and Delphi 2007, but fails with Delphi 2010
> > 
> > I tried your code in D2010 and D2009. This looks like a bug indeed,
> > since both 1.txt and 1.bin are exactly the same in both versions and
> > look correct. The property it can't read seems to be the first
> > element of Threshold. 
> 
> It is more like it failed to process the start of the record
> structure, starting with ".Threshold." (it should have called
> DefineProperties but it didn't and then moves one to the next item in
> the binary resource which happens to be a length specifier (2 bytes)
> for the first element of that same record (instead of a true
> name/identifier for the next property identifier to read).

You're right. The problem seems to be the result of GetPropInfo().

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"The pen is mightier than the sword, and considerably easier to
 write with." -- Marty Feldman.
0
Rudy
9/12/2009 3:12:43 PM
Rudy Velthuis (TeamB) wrote:

> The problem seems to be the result of GetPropInfo().

It looks like *published* records are treated differently in D2010
compared to previous versions, making the record just public and
everything works fine again.

-- 
Pieter

"Pardon him, Theodotus; he is a barbarian, and thinks that the 
 customs of his tribe and island are the laws of nature." 
 -- George Bernard Shaw
0
Pieter
9/12/2009 3:27:46 PM
Wayne Davis wrote:

> Is there any other way to stream in or read components from files
> containing the text version of their resources, or is this a show
> stopper?

1) Does it have to be a published property? If not, move it to the
public part and it should work again as before.

2) If the above is not possible for you, would it be an option to
rewrite your component to no longer use records for storing the
information but using classes (TPersistent) instead?

-- 
Pieter

"The true measure of a man is how he treats someone who can do 
 him absolutely no good." -- Samuel Johnson (1709-1784)

Edited by: Pieter Zijlstra on Sep 12, 2009 5:28 PM
0
Pieter
9/12/2009 3:28:49 PM
Pieter Zijlstra wrote:

> Rudy Velthuis (TeamB) wrote:
> 
> > The problem seems to be the result of GetPropInfo().
> 
> It looks like published records are treated differently in D2010
> compared to previous versions, making the record just public and
> everything works fine again.

Yes.
-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"If all the world's managers were laid end to end, it would
 be an improvement."
0
Rudy
9/12/2009 3:49:24 PM
> {quote:title=Pieter Zijlstra wrote:}{quote}
> Rudy Velthuis (TeamB) wrote:
> 
> > The problem seems to be the result of GetPropInfo().
> 
> It looks like *published* records are treated differently in D2010
> compared to previous versions, making the record just public and
> everything works fine again.
> 
> -- 
> Pieter
> 
> "Pardon him, Theodotus; he is a barbarian, and thinks that the 
>  customs of his tribe and island are the laws of nature." 
>  -- George Bernard Shaw


Thank You !!!

I don't think I need to keep them published. I went through my project and moved all my custom data types to the public declarations and it worked like a charm,
0
Wayne
9/12/2009 4:56:14 PM
Record alignment.

Try adding
{$A4}
0
Warren
9/14/2009 12:33:08 PM
Wayne Davis wrote:

> I've been racking my head trying to figure this out and can't
> understand what is wrong, TFileStream.ReadComponentRes fails when I
> try to read a component containing a record, it works fine in Delphi
> 2009 and Delphi 2007, but fails with Delphi 2010

I've used you example and reported it:

Report No: 77635          Status: Reported
The new RTTI of D2010 causes components with published record
properties to fail to stream in.
http://qc.codegear.com/wc/qcmain.aspx?d=77635

-- 
Pieter

"Not only is there no God, but you try getting a plumber at 
 weekends." -- Woody Allen.
0
Pieter
9/14/2009 7:56:28 PM
Pieter Zijlstra wrote:

> Wayne Davis wrote:
> 
> > I've been racking my head trying to figure this out and can't
> > understand what is wrong, TFileStream.ReadComponentRes fails when I
> > try to read a component containing a record, it works fine in Delphi
> > 2009 and Delphi 2007, but fails with Delphi 2010
> 
> I've used you example and reported it:
> 
> Report No: 77635          Status: Reported
> The new RTTI of D2010 causes components with published record
> properties to fail to stream in.
> http://qc.codegear.com/wc/qcmain.aspx?d=77635

I had a look at it and promoted it.
-- 
Uwe
0
Uwe
9/14/2009 8:57:03 PM
Uwe Schuster wrote:

> > I've used you example and reported it:
> > 
> > Report No: 77635          Status: Reported
> > The new RTTI of D2010 causes components with published record
> > properties to fail to stream in.
> > http://qc.codegear.com/wc/qcmain.aspx?d=77635
> 
> I had a look at it and promoted it.

Thanks!

-- 
Pieter

"Death does not concern us, because as long as we exist, death is 
 not here. And when it does come, we no longer exist." 
 -- Epicurus.
0
Pieter
9/14/2009 9:24:47 PM
"Pieter Zijlstra" <p.zylstra.notthis@hccnet.nl> wrote in message 
news:161271@forums.codegear.com...

> Why GetPropInfo() re-acts differently in D2010 is something I haven't
> completely figured out yet

Probably related to the new Enhanced RTTI feature that is introduced in 
D2010.

-- 
Remy Lebeau (TeamB)
0
Remy
9/17/2009 11:19:50 PM
Remy Lebeau (TeamB) wrote:

> "Pieter Zijlstra" <p.zylstra.notthis@hccnet.nl> wrote in message
> news:161271@forums.codegear.com...
> 
> > Why GetPropInfo() re-acts differently in D2010 is something I
> > haven't completely figured out yet
> 
> Probably related to the new Enhanced RTTI feature that is introduced
> in D2010.

Yes, probably. But how exactly is the question.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Just because the standard provides a cliff in front of you, 
 you are not necessarily required to jump off it." 
 -- Norman Diamond
0
Rudy
9/18/2009 10:28:39 PM
Reply:

Similar Artilces:

Delphi 2009 (and probably Delphi 2010 as well) and QTP
We have a suite of automatic tests written in QTP (Quick Test Pro - an HP product), and we have just upgraded to Delphi 2009 (I know we are late adopters), and all of these tests no longer work. The plugin that QTP have released does not work with Delphi 2009 - we have that in writing now from HP. Do you know of (a) anyone else in the same boat as us (b) anyone have a work around, as I can't see one and HP don't seem to be too proactive about this. Any help would be appreciated. I just installed D2010. We started using QTP several months ago so I assume we will have the same issu...

Is it worth to move my code from Delphi 2009 to Delphi 2010?
Hi guys, we are working on Delphi 2009 till this day because we do not have the time to upgrade our code to the newest version. There is always something more important (features, bugs...) and our code has 2+ million lines. I thought that instead of moving from D2009 to XE7 I could atleast move code to D2010 because it is more or less backward compatible and it shouldn't take me that much of a work. I wanted to ask you about your opinion. Is it a good version to move to? Regards. Dimitrij wrote: > I thought that instead of moving from D2009 to XE7 I could atleast > move ...

Code works in Delphi 7 but not in Delphi 2010 [Edit]
hello, i have a procedure that open's a file by passing the file name as the parameter to the executable. something like this {code} C : \ P r o g r a m F i l e s \ Da c k e r \ D r a c k e r . e x e " G : \ D E l p h i 7 \ D e l p h i 7 A p p _ l o g . t " {code} The source code is {code} procedure OpenFileWithExe var hReg: HKEY; Ret: Longint; RegDataType, RegDataSize: DWORD; CmdLine: array [0..560] of Char; Len: Integer; SInfo: TStartupInfo; PInfo: TProcessInformation; begin Ret := windows.RegOpenKeyEx(HKEY_CURRENT_USER, ...

Delphi 4 to Delphi 2009
Hello, Thanks to all who answered my previous question. That was a great help. And atlast our client agreed to upgrade our delphi version from 4 to Delphi 2009. *Sigh*. But before that, I need to give the estimation and cost regarding the migration to delphi 2009. Can anyone tell me is there any tool to migrate from delphi 4 to delphi 2009 or just I need to compile our Delphi 4 application in Delphi 2009. I have read from the delphi 2009 feature matrix that Delphi 1 through Delphi 2007 import is possible in delphi 2009. But i am not that sure considering the size of our application. ...

Delphi XE / Delphi 2010
Hello! I noticed that Embarcadero® Delphi® 2010 Version is not on the list of products on Embarcadero page. Or is it still possible to buy it? Will RAD Studio XE compile programs written in Delphi 2010 without problems.? Thanks. Am 13.09.2010 09:04, schrieb Petra Nemec: > Will RAD Studio XE compile programs written in Delphi 2010 without problems.? As always you will probably have to recreate the projects as the import is still a bit -- special. Christian Hello! Does anybody know if it is still possible to get a Delphi2010 trial version (if yes where)? ...

from delphi 6 to delphi 2010
Hi. It is possible, with component RX, dxforumlibrary, InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. Thank by comments. excequiel arostica wrote: >Hi. > It is possible, with component RX, dxforumlibrary, >InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. > >Thank by comments. Rx is dead and sources are taken over by jcl/jvcl. I dont know about the rest of the components and i have no experiences with bde over the last 9 years. excequiel arostica wrote: > Hi. > It is possible, with component RX, dxforumlibrary,...

Delphi 5 To Delphi 2009
I upgraded to Delphi 2009 from D5. The install says I can install Delphi and/or C++. Delphi installed OK but I see nothing of C++. What am I missing or does my upgrade not include C++? Thanks It depends on what you bought. If you bought Delphi 2009 only, that's what you get. If you bought Delphi 2009 and C++ Builder 2009 you get both. My guess is you got Delphi 2009 only. The simplest way to verify is look your invoice - it should say I would think. You could also go to members.embarcadero.com, login, then click on my registered products. There will be a textual description of...

dll fails when compiled with delphi 2010, but works with delphi 7
I may be doing good if someone can just point me to the right forum I have not created a dll for some time and have not written one with 2010 before. The dll I am creating will be called as a cfx function by either a ColdFusion or BlueDragon webserver. I have written cfx DLLs in the past. The function declaration is below, it is the standard declaration from ColdFusion or Bluegradon documention on creating a CFX. procedure ProcessTagRequest(Request: TCFXRequest); export; cdecl; Since this was the first time using 2010 I wrote a very basic function to build off that was not much mor...

Delphi 2010 produces much larger binaries than Delphi 2009 [Edit]
When I compile my project with Delphi 2010 the resulting executable is about 30% larger than the one compiled with Delphi 2009. Both binaries are compiled with the same source code and project options. The size of individual DCU files increases by 5-20%. Has anybody experienced similar results? Has anybody an idea what could cause this? It surprises me, as the changes in syntax and VCL have not been that big. Best regards, Joachim Edited by: Joachim Marder on Sep 25, 2009 6:07 AM "Joachim Marder" wrote in message news:166152@forums.codegear.com... > When I compi...

Problems
Hi; We have a software developed in the Delphi 2009 and we do NOT use the runtime themes. So, the option: Projetct / Options / Application / Enable Runtime Themes is UNCHECKED. When I'm on the Delphi 2009, it's all right. The problem is when I use the Delphi 2010. The same configuration (Projetct / Options / Application / Enable Runtime Themes is UNCHECKED). The form editor (IDE) insists on show the forms with the current Windows theme. I don't like this, I want the runtime themes off while I'm programming and editing my forms. How can I solve it? Thanks to...

Price of upgrade from Delphi 2010 Professional to Delphi 2010 Enterprise?
It's weird, but I could not find the answer on so simple question not in Embarcadero Shop, neither by the forum search. For example, the shop info about Enterprise upgrade says: The Upgrade product is available to registered owners of 2006-2009 versions, blah-blah... So, if I'm Delphi 2010 Professional user, I even not eligible for upgrade? I have to buy a new version of Enterprise??? But if I'm Delphi 2006 Professional user, I can upgrade. Please clarify this nonsense for me. Exact question is in the subject. Thanks! Hi Dmitri, > It's weird, but I could not...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Upgrading to Delphi 2009 from Delphi 5
I've decided it's time to upgrade to Delphi 2009 Professional from my current Delphi 5 Professional which (according to the FAQ) makes me eligible for the upgrade pricing. However, I'd just like to clarify how this process works. My concern is that my Delphi 5 is not registered on the CodeGear site and this doesn't seem to be possible as far as I can tell. When installing the trial I noticed that Delphi 2009 registers itself with your CodeGear account so does this mean that the previous version must be registered there to verify you own a Professional edition? I plan to o...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Delphi 2010 w Delphi 2007
I have D2007 installed on my laptop (XP sp3 running on dual core Athlon). Can I install D2010 on this machine without it affecting D2007? Will D2010 affect D2007 in any way? Thanks, Randall Carpenter > {quote:title=Randall Carpenter wrote:}{quote} > I have D2007 installed on my laptop (XP sp3 running on dual core Athlon). > Can I install D2010 on this machine without it affecting D2007? Will D2010 > affect D2007 in any way? Won't hurt a thing. I have D7, RAD Studio 2007, RAD Studio 2009, and RAD Studio 2010 all on my desktop system and they coexist fine. Jus...

is there a Delphi 2007
Would be nice to have a bundle of the latest Delphi packages. Gilbert Padilla wrote: > Would be nice to have a bundle of the latest Delphi packages. > I expect Delphi 2007 will only be on sale until the full RAD Studio 2009 edition is published, including Delphi 2009.net. W ...

Delphi 2009 alongside Delphi 2007
Hi all, I am about to install Delphi 2009 on the same development system as Delphi 2007, before I embark is there anything I should be aware of so as to not break my Delphi 2007 installation and projects ? Thanks JT John Taylor wrote: > Hi all, > > I am about to install Delphi 2009 on the same development system > as Delphi 2007, before I embark is there anything I should be aware > of so as to not break my Delphi 2007 installation and projects ? As long as you install into a separate folder there is no problem with the two versions getting into each other...

Delphi 2007 RTL in Delphi 7
I read somewhere that it is possible to use Delphi 2007's (or for that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the source of RTL. Is this really possible? What are the benefits that we can derive using a higher version's RTL? TIA Yogi Yang Yogi Yang wrote: > I read somewhere that it is possible to use Delphi 2007's (or for > that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the > source of RTL. If it actually compiles in Delphi 7, I guess it would be possible. OTOH, if one has Delphi 2007 already, I don't s...

Delphi 2007 to Delphi 2009 Conversion
CharArrayPtr = ^CharArray; CharArray = array[0..MaxInt-1] of Char; How to convert to Delphi 2009? Bill Bill Miller wrote: > CharArrayPtr = ^CharArray; > CharArray = array[0..MaxInt-1] of Char; > > How to convert to Delphi 2009? > > Bill it depends heavelly on how it is used fearther down in your project and what you want to convert it to. I you want to simple convert the declarations ignoring UNicode altogether then the only think you have to change is the CharArray declaratin from a Char to an AnsiChar eg CharArrayPtr = ^CharArray; CharArray =...

Delphi 7 to Delphi 2009 conversion
Hello group, What do I need to do to comile the following code in D2009. Compiler error after the Else E2010: Incompatible Types 'AnsiChar' and 'Char' if isUnicode then SearchHandle := FindFirstFilew( PWideChar( fn ), FindDataW ) else SearchHandle := FindFirstFile( PAnsiChar( Ansistring( fn ) ), FindDataA ); <<<<<compiler error in the above line >>>>>>>>>>> Regards, Bryan > What do I need to do to comile the following code in D2009. > Compiler error after the Else > E2010: Incompati...

Migrate from Delphi 2007 to Delphi 2010
Hi All, Thanks in advance for your help. Below is my query, Currently I am using Delphi 2007 and i want to migrate to Delphi 2010. 1. What all things i need to take care while doing this? 2. What all third party components will get impacted? 3. Any known issues in Delphi 2010 which might impact the cause? 4. Any changes in database operation required as i am using Oracle? Hope I have post this query under correct category. If not sorry for the trouble and could you please suggest me the correct category for this? Looking forward for your response. Have a great day. Th...

delphi 2006 code in delphi 2010
hello, is there any option to make delphi 2006 code work in delphi 2010? something like in java IDEs where you can define the code level you like to use? the problem is, that i made a project with 2006 and sent it to my customer. they got 2010 and it compiles fine, but it just doesn't work. it deals with en-/decryption of text, we assumed, that it has something to do with ansi vs. unicode strings... but we cant find the exact position where the error occurs. i am a bit dissapointed, because everywhere i read that the new IDE will always be downwards compatible and so on.. but in ...

Migrating From Delphi 7 to Delphi 2010
We did not know which forum was the best for this question. We have been wanting to migrate from Delphi 7 to a later version for years but it appears to be a daunting task. We first looked at D2006 and that was a radical new world. We bought D2010 a couple of years ago and not done much with it because there are so many parts to our applications. We have done a few new applications in D2010 and they seem to work okay. D2010 has not been impressive, perhaps because of the strangeness compared to D7. Is is possible for us to do a phased sort of migration where we do a form at a time? ...

Delphi 2010 professional to Delphi XE3
Hello, Sorry for this is not right place to ask this question: I have Delphi 2010 professional version, I like to upgrade to Delphi XE3 Am eligible to upgrade or no not? I like answer from Delphi sales team. I couldn’t find email to ask them. Thanks Mike Thomas <> wrote in news:506459@forums.embarcadero.com: > Hello, > > Sorry for this is not right place to ask this question: > I have Delphi 2010 professional version, I like to upgrade to Delphi > XE3 Am eligible to upgrade or no not? I like answer from Delphi > sales team. I couldn’t find emai...

Web resources about - Why does this work fine in Delphi 2009, but not in Delphi 2010 - embarcadero.delphi.rtl

Delphi - Wikipedia, the free encyclopedia
... an archaeological site and a modern town in Greece on the south-western spur of Mount Parnassus in the valley of Phocis . The site of Delphi ...

Delphi Automotive (@DelphiAuto) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Delphi Automotive @ DelphiAuto ...

Delphi Connect for Verizon on the App Store on iTunes
Get Delphi Connect for Verizon on the App Store. See screenshots and ratings, and read customer reviews.


Audi working with Delphi to develop autonomous car tech
Audi is developing an iPad-sized device that will pack all the necessary computing power for a self-driving car

Domestic firms eye Delphi
BizChina offers latest business and market information of China, online updates of 17 industries, investment guides, business events and industry ...

Verizon And Delphi Officially Launch Vehicle Diagnostics Service - $250 For The Module, $5 A Month On ...
If you're a car nut, a paranoid parent, or a small business owner looking to do a little, uh, company vehicle economy analysis, Verizon's teamed ...

Watch out Google: Delphi gives Ars a ride in its self-driving car
The automotive components maker gave Ars a preview ride around the neighborhood. MOUNTAIN VIEW, CA—On Thursday morning I met with Delphi at its ...

Official: Verizon's Vehicle Diagnostics by Delphi now on sale for $250
Filed under: Technology Partnering with Verizon Wireless, Delphi Automotive has released its Vehicle Diagnostics by Delphi product that allows ...

Delphi partners with WiTricity on automated wireless charging system
One could easily argue that parking between the white lines at any local hangout presents a challenge for some inexperienced drivers. So, why ...

Resources last updated: 2/23/2016 7:25:06 PM