Delphi 2007 to Delphi 2009 Conversion

CharArrayPtr = ^CharArray;
CharArray = array[0..MaxInt-1] of Char;

How to convert to Delphi 2009?

Bill
0
Bill
9/18/2008 1:47:00 PM
embarcadero.delphi.win32 2183 articles. 0 followers. Follow

4 Replies
1331 Views

Similar Articles

[PageSpeed] 55

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 = array[0..MaxInt-1] of AnsiChar; //----------- this changed

This Shoold be enough that the procedures using it and are expecting
ANSI characters in the string will work with out any changes.

regards
Yannis.
-- 
"The difference between pornography and erotica is lighting."
 -- Gloria Leonard
0
IOANNIS
9/18/2008 2:31:38 PM
> 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 = array[0..MaxInt-1] of AnsiChar; //----------- this changed
>
> This Shoold be enough that the procedures using it and are expecting
> ANSI characters in the string will work with out any changes.


Hi Yannis,

I am trying to maintain the TString type without using Ansi.  I think I 
should try to maintain Unicode capability.   I but am not sure how to handle 
these conversions yet.

Bill
0
Bill
9/18/2008 3:49:29 PM
Bill Miller wrote:

> Hi Yannis,
> 
> I am trying to maintain the TString type without using Ansi.  I think
> I should try to maintain Unicode capability.   I but am not sure how
> to handle these conversions yet.

CharArrayPtr = ^CharArray;
CharArray = array[0..(MaxInt div SizeOf(Char)) - 1] of Char;

This would be the recomended way to declare it I guess. 

regards
Yannis.

-- 
"Only two things are infinite, the universe and human stupidity, 
 and I'm not sure about the former."
 -- Albert Einstein (1879-1955)
0
IOANNIS
9/19/2008 8:18:31 AM
> I am trying to maintain the TString type without using Ansi.  I think I
> should try to maintain Unicode capability.   I but am not sure how to 
> handle
> these conversions yet.

Why without using Ansi ? Seems like trying to make a form, but without using 
buttons :)
0
Raymond
9/19/2008 11:59:52 AM
Reply:

Similar Artilces:

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 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...

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 ...

Migrate from Delphi 2007 for Win32 to Delphi XE
we use Delphi 2007 for Win32 to support legacy (32Bit) OWL-based pascal applications (yes i know it was a mistake not to switch to VCL 15 years ago). could our applications still be opened and compiled with Delphi XE? The existing projects are all plain Pascal-Code, coming back from the times of Turbo Pascal for Windows and later on Borland Pascal. Are there any improvements we could profit from (i.e IDE, Debugger)? Thanks Andrej > {quote:title=Andrej Dimic wrote:}{quote} > could our applications still be opened and compiled with Delphi XE? I'm not sure, but I guess ...

Code Porting
Hi people, Basically, I am moving an app from Delphi 5 to Delphi 2009 which is all great (yeah right!) and I am having a couple of issues with some thirdparty components that we have the source code for. Being that I wanted to make the task as easy as possible, I was able to download the component in Delphi 2007 format. I have now managed to port that to 2009 so it compiles only with warnings and no errors. So all is good at this moment. Now I am trying to install the component into the IDE by using the install menu option from the project manager. This is where I run into errors. ...

Can I update my Delphi 2007 lincense to Delphi 2009?
Hi all!! I have 12 lincense of Delphi 2007. When I bought these licenses to your partner told us that we could update to Delphi 2009 free. But, now I try to do that and I can't do. Are there any reason for that? Can I update my version of Delphi? > {quote:title=Oscar Estevez wrote:}{quote} > Hi all!! > > I have 12 lincense of Delphi 2007. When I bought these licenses to your partner told us that we could update to Delphi 2009 free. But, now I try to do that and I can't do. > Are there any reason for that? > > Can I update my version of Delphi? ...

Restore Delphi 2007 dbxpress after testing Delphi 2009
Over on another thread I mentioned that I was having problems with dbxpress after testing Delphi 2009. It started that I noticed that Delphi 2007 was compiling against the newer version of dbxpress drivers (dbxmys.dll, rather than dbxmys30.dll). This was spotted after testing an application on a colleagues machine that had the older driver, but not the newer. The application was "pure" 2007. This continued after uninstalling Delphi 2009. It was suggested that Delphi 2009 had overwritten my +dbxdrivers.ini+ file - and looking at it that looks like the problem. It was also...

can i use delphi 2007 bpls in delphi 2009
can i use delphi 2007 bpls in delphi 2009 ? "Gaetan SIRY" skrev i meddelelsen news:8703@forums.codegear.com... > can i use delphi 2007 bpls in delphi 2009 ? No. -- Finn Tolderlund The compatiblity between D2006 and D2007 was unique. Normaly they can't be compatible because new version enhance/change the API. And D2009 defines String = Unicode where older version has String = Ansistring so D200x/Dx-BPL are 200% incompatible with D2009. ...

Delphi 2007 to Delphi 7
I've written a class in Delphi 2007 that is not supported in Delphi 7. What would be the best way to achive what I've done in Delphi 2007 in Delphi 7? Thanks, Tom type BondConstants = class { Bond Types } type BondType = record const TREASURY = 3; AGENCY = 0; CORP = 1; MUNI = 2; SBA = 5; MBS = 4; CMO = 6; end; { Day Count Methods } type DayCount = record const ACTUAL_360 = 2; ACTUAL_365 = 1; ACTUAL_ACTUAL = 1; d30_360 = 0; ...

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...

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 4 to Delphi 2007
Hello, I will have to port a D4 application (with source) to D2007. what kind of problem could I face ? I will have to go to customer site tommorow to analyse its source code to quote the work, what should I care of to hestimate the porting time ? Thanks John Terry wrote: > Hello, > I will have to port a D4 application (with source) to D2007. > what kind of problem could I face ? > I will have to go to customer site tommorow to analyse its source code > to quote the work, what should I care of to hestimate the porting time ? You can probably do it by just changi...

Indy IdHMACSHA1 different results in Delphi 2007 and Delphi 2009
Hello newsgroup A test of the IdHMACSHA1 encryption method shows different results, and I am not sure if there is an error in my code or in the Indy code shipped with Delphi 2009. The Delphi 2007 version works in an application which communicates with Amazon Web Services and so it seems to be the correct one. Any suggestions are very welcome, maybe I just need to download a newer version of Indy? program Test; {$APPTYPE CONSOLE} uses IdHMACSHA1, IdCoderMIME, IdGlobal, SysUtils; function Base64Encode(const Input: string): string; begin Result := TIdEncode...

Best Place to get help on converting Delphi 2007 string to Delphi 2009
Where is the best place to get help on converting Delphi 2007 strings to Delphi 2009? The most common problem getting Delphi 7-Delphi 2007 components to compile seems to be caused by the new Unicode strings in Delphi 2009. It would be great if there was some place to go to get help with this. Maybe there should be a new group for String conversion where developers could ask short questions about conversion. For example: Delphi 7 - Delphi 2007 CharArrayPtr = ^CharArray; CharArray = array[0..MaxInt-1] of Char; Compiles Delphi 2009 CharArrayPtr = ^CharArray; CharArray ...

Web resources about - Delphi 2007 to Delphi 2009 Conversion - embarcadero.delphi.win32

Conversion (law) - Wikipedia, the free encyclopedia
Its criminal counterpart is theft . Examples are seen in cases where trees are cut down and the lumber hauled from the land by someone not having ...

Family of Enrique Marquez unaware of his 2014 marriage, conversion to Islam
The family members of Enrique Marquez, the man linked to the San Bernardino massacre, said they were unaware he was married or that he had converted ...

Effective Strategies for Increasing E-Commerce Conversions
... tips for improving your ecommerce strategy and related outcomes. Social signals are a powerful tool for engaging users and increasing conversion ...

Christmas Verse: A tale of conversion or, as Christians view it, re-birth
The Journey of the Magi, T. S. Eliot 'A cold coming we had of it, Just the worst time of the year For a journey, and such a long journey: The ...

Revisiting Carlos Martinez's rotation conversion
... thanks to his pitch mix, then it sure sounded like it could be possible. Now, almost a full year later, I wanted to revisit Martinez's conversion. ...

Dow to Force Conversion of Buffett Preferreds If Rally Holds
Bloomberg Dow to Force Conversion of Buffett Preferreds If Rally Holds Bloomberg Dow Chemical Co., which has been paying $255 million annually ...

​Judge orders N.J. "gay conversion" nonprofit to close
Jews Offering New Alternatives for Healing, known as JONAH, ordered to cease operations within 30 days

Eight Christians acquitted of forced conversion in India
Eight Christians who were accused of forcibly converting a Hindu have been acquitted by a court in India according to Asia News.

Council votes to ban gay 'conversion' therapy in Cincinnati
Cincinnati follows four states and the District of Columbia banning the therapy, becoming the first city outside D.C. to do so.

Solar Frontier Pushes CIS (aka CIGS) Thin Film Solar Envelope With New Conversion Record, Factory Model ...
Japan's Solar Frontier comes up with a killer combo, a new low cost thin film solar manufacturing model and a new solar conversion efficiency ...

Resources last updated: 1/4/2016 9:20:52 PM