Delphi 5 to Delphi 6 conversion

Hi 

We are moving our product from D5 to D6. 

I have dealt with all the deprecated functions.

However, we are getting various platform specifc warnings. These include:

Symbol 'FileGetAttr' is specific to a platform
Symbol 'FileSetAttr' is specific to a platform
Symbol 'faReadOnly' is specific to a platform

We want this conversion to be carried out correctly. 
We don't view the simple solution of switching off those warnings or symbols as being the correct way. 
What we want is the same platform independence as other functions. 
For example, all of our IncludeTrailingBackslash function calls were replaced with IncludeTrailingPathDelimiter calls. 

Is there a sensible way to sort out these 3 warnings in the same manner, so that the final executable will be platform independant?

Thanks
Tony Danby
0
tony
3/3/2009 12:15:14 PM
embarcadero.delphi.vcl.using 2297 articles. 2 followers. Follow

5 Replies
1775 Views

Similar Articles

[PageSpeed] 58

> We are moving our product from D5 to D6. 
> 
> I have dealt with all the deprecated functions.
> 
> However, we are getting various platform specifc warnings.

D6 was the first version following the release of Kylix, so given Kylix
is now a discontinued product, you *could* turn off the platform
warnings with a reasonablely clear conscience (i.e., the 'platform'
differences in question are those between Windows and Linux).  That
said, I avoid doing this myself if I can, just like you.

> Symbol 'FileGetAttr' is specific to a platform
> Symbol 'FileSetAttr' is specific to a platform
> Symbol 'faReadOnly' is specific to a platform

Check out the FileIsReadOnly and FileSetReadOnly functions in SysUtils.
If you're twiddling any attribute other than faReadOnly though,
temporarily turning off the resulting warning is the sensible thing to
do for this particular case.  The only alternative, I think, would be
to make the platform specificness explicit by using the equivalent API
functions and constants.
0
Chris
3/3/2009 1:10:03 PM
On Tue, 3 Mar 2009 04:15:14 -0800, tony danby wrote:

> Hi 
> 
> We are moving our product from D5 to D6. 
> 
> I have dealt with all the deprecated functions.
> 
> However, we are getting various platform specifc warnings. These include:
> 
> Symbol 'FileGetAttr' is specific to a platform
> Symbol 'FileSetAttr' is specific to a platform
> Symbol 'faReadOnly' is specific to a platform
> 
> We want this conversion to be carried out correctly. 
> We don't view the simple solution of switching off those warnings or symbols as being the correct way. 
> What we want is the same platform independence as other functions. 
> For example, all of our IncludeTrailingBackslash function calls were replaced with IncludeTrailingPathDelimiter calls. 
> 
> Is there a sensible way to sort out these 3 warnings in the same manner, so that the final executable will be platform independant?

File attributes are by their nature platform dependant (UNIX
attributes are very different to Windows attributes). If you jus want
to check vhe readonly attribute then use
FileIsReadOnly/FileSetReadOnly. If you need more control then I
suggest that you create similar wrapper functions in a seperate unit
and turn off platform warnings for that unit only.

-- 
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
0
Marc
3/3/2009 1:27:17 PM
Chris - Thanks for that, that is exactly what we need for now.
0
tony
3/3/2009 1:52:11 PM
Marc - Thanks for that, it adds strength to what Chris has said, plus it made me think about other longer term solutions.
0
tony
3/3/2009 1:53:11 PM
<tony danby> wrote in message news:87770@forums.codegear.com...

> However, we are getting various platform specifc warnings. These include:
>
> Symbol 'FileGetAttr' is specific to a platform
> Symbol 'FileSetAttr' is specific to a platform

Those functions are only implemented on the Windows platform.  That is why 
they are marked with the 'platform' keyword now.  If you want your code to 
be portable to other platforms, then you have to re-write the code to use 
your own platform-agnostic functions.  Otherwise, just ignore the warnings 
if you are only targetting the Windows platform.

> Symbol 'faReadOnly' is specific to a platform

The only non-Windows function that uses faReadOnly is FindMatchingFile(). 
It uses faReadOnly on Windows and Linux.  The rest of the uses of faReadOnly 
are specific to Windows only.

> What we want is the same platform independence as other functions.

Then you need to find other functions to use.  The ones you are using are 
specific to Windows.

-- 
Remy Lebeau (TeamB)
0
Remy
3/3/2009 10:48:02 PM
Reply:

Similar Artilces:

Delphi 5 to Delphi 6 and up
Dear List, Trying to add 7Zip compression support to my delphi application. I am using the ported 7Zip sdk (see their website, they have a link). I am stumped on how to rewrite a single function: function ReverseDecode(var Models: array of SmallInt; ....): ..... where the input is mostly a fixed size array of SmallInt. This code perfectly compiles and functions in Delphi 6 and up, but in Delphi 5 I get the error: There is no overloaded version of 'ReverseDecode' that can be called with these arguments And obviously, the input (fixed) isn't the same as the param de...

package conversion from Delphi 5 to Delphi 2010
Hello, I am evaluating 2010 to convert a delphi 5 app up. My first task is to convert some custom control packages. My requires statment looks like this: requires vcl50, Vclx50, VclSmp50, Vcldb50, vcljpg50, What are the delphi 2010 equivalents if any? Is there documentation that I could look at to help with the conversion process? Thanks.. ...Joe.. joe alaimo wrote: > requires > vcl50, > Vclx50, > VclSmp50, > Vcldb50, > vcljpg50, 140 is the 2010 version. > > What are the delphi 2010 equivalents if any? Is t...

Delphi 6 to Delphi 2010 character codes conversion
I an converting a unit from Delphi 6 to Delphi 2010. Everything works except for a couple of character codes, the decimal values are(224 and 227). As far as I can tell when data is loaded from the socket into a buffer, the codes are ok. When they are written to another buffer these 2 codes use the upper case version of the characters(192 and 224). I don' t see it on any other of the codes. I set the code page in the compiler options to 1252, but that did not work. Any other options I can set in Delp hi 2010 to correct this? TIA Jan B wrote: > I an converting a unit from D...

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

Delphi 5 to Delphi XE4
Thinking about making the conversion. Of course we have numerous components such as: TurboPower AsyncPro, TurboPower Orpheus ICS2 Synactis All-In-The-Box. You guys have any advice as to the effort and time it may possibly take. It is a large application, several hundred thousand lines. And that's what happens when using third party components, a lot of extra work. I have been burned a few times. I now minimize the use to a few well known suppliers, like TMS. I have "banned" a lot of other components. Regards, Ole > > Thinking about making the conver...

SEPA components for Delphi with Source Code (Delphi 5
Hi all, in the european union change next year the Bankingformat to the SEPA Format. All peoples and companies must change the bankingssoftware and the costumer data form acountnummers in the new IBAN and BIC numbers. See: http://www.arma-it.de/shop/artikelueber.php?wgruppeid=211&wgruppe_offen=211 Functions: - generate SEPA XML'S - Calc IBAN - BIC Database (DE,AT and CH) Questions: vertrieb@arma-it.de PS: Bankinssoftware for Develpoers (Germany only) http://www.arma-it.de/shop/artikelueber.php?wgruppeid=212&wgruppe_offen=212 El 26/10/13 21:38, A...

Trying to call a .DLL from Delphi XE (used to work with Delphi 6 :-) )
Hi everyone, I have a problem where perhaps some one could help point me in the right direction. In Delphi 6 I used a stand alone package to train a neural netowrk,. The trained neural network was stored as a .DEF file. The standalone software provided a .DLL and Delphi code to call the network and get the prediced values from your sw. (The .DLL was created in 2002 and apparently is 32 bit.) I have'nt used it for years but am now coming back to it.... I now use Delphi XE on Windows 7 (32 bit) The old .exe's I had compiled from that time work fine. However in Delphi XE ...

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

Messy Help Conversion: Delphi 5-->Delphi 2010 + Winhelp-->HTMLHelp
Hoping someone can give me guidance on this Help problem... I am a tech writer (not a programmer). We have an old Windows App that was created in Delphi 5. The app used Winhelp, which was authored in RoboHelp for Word. The help included context sensitive topics using mapping IDs. So now we have upgraded to Delphi 2010. And I have converted to Microsoft HTMLHelp, using RoboHelp. That is, instead of an .HLP file, we now have a .CHM file. What do the developer's need to reconfigure in Delphi? They have been able to get the new .CHM file to open with the app, but the help windo...

ANN: WPTools 6.20 for Delphi 5 to Delphi XE2 & C++Builder
WPTools V6.20 is available now. If you work with Delphi or C++Builder our WPTools Version 6 is the perfect text wordprocessing component for You. It is a native VCL Component with all the editing features which are common to powerful wordprocessing applications and wordprocessing controls. With the PRO and Premium License you get 100% object pascal source. WPTools can be used as a powerful word processor and to create programmatically controlled text. It has a very versatile mail-merge feature which can be enhanced with the "WPReporter addon" to also work with bands. So it ...

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

Migration from Delphi 5 to Delphi 2005
Hi, Currently we are using Delphi 5 in that we have lot of source file now we planned to migrate from Delphi 5 to Delphi 2005. My question is - 1. Is it possible to migrate directly from Delphi 5 to Delphi 2005, my old code was developed using Delphi 5 IDE. Can we able to compile and build without any issue in Delphi 2005? 2. If we can able to do then what are the ways to migrate to Delphi 2005 IDE and also provide some link regarding this migrate? Thanks, Rizwan Rizwan Ahmed schrieb: > Hi, Currently we are using Delphi 5 in that we have lot of source > f...

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

Web resources about - Delphi 5 to Delphi 6 conversion - embarcadero.delphi.vcl.using

Gene conversion - Wikipedia, the free encyclopedia
Gene conversion is the process by which one DNA sequence replaces a homologous sequence such that the sequences become identical after the conversion ...

Sonny Bill Williams' transformation due to conversion to Islam, Anthony Mundine says
He went from being savaged for walking out on the Bulldogs to becoming one of the world's most respected rugby union stars. Anthony Mundine believes ...

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

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

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.

Roth IRA conversion is complicated
Tax rules governing IRAs are complex and ever changing, so if you're considering a Roth conversion, do some legwork first.

Del Rio explains why Raiders went for late two-point conversion
... A's Sharks Warriors Kings 49ers Raiders Quakes Insiders More Tickets Shop Watch Del Rio explains why Raiders went for late two-point conversion ...

Resources last updated: 12/27/2015 10:21:36 PM