RAD Studio for Microsoft .NET |  |

Porting VCL Applications
General Language Issues | Renaming Packages | New Language Features | Porting Web Service Client Applications | See Also
Collapse All

When porting VCL applications from Delphi 7 to RAD Studio, there are issues you need to consider. Along with basic language elements that need to be replaced or modified, there are strategies that you should follow to make sure that you port your applications fully and reliably.

This topic includes

- General Language Issues
- Renaming Packages
- New Language Features
- Porting Web Service Client Applications

General Language Issues

Porting Delphi 7 applications to RAD Studio exposes several language issues in the .NET Framework. For instance, the .NET Framework considers pointers to be unsafe and so does not consider applications that use pointers to fall into the category of managed code. To be compliant with the .NET Framework, you need to modify your applications to avoid or circumvent the use of pointers, the pChar type, and other language-specific elements.

In addition, there are critical issues with the Win32 API, using crackers, migrating char types, and other topics.

Renaming Packages

When porting a Delphi 7 package to RAD Studio, you will need to change the old package names in the "Requires" list to the corresponding new package names. The following table shows the old and new names.

Old Package Name | New Package Name
rtl | Borland.Delphi and Borland.VclRtl
vcl | Borland.Vcl
vclx | Borland.VclX
dbrtl | Borland.VclDbRtl
bdertl | Borland.VclBdeRtl
vcldb | Borland.VclDbCtrls
dbexpress | Borland.VclDbExpress
dbxcds | Borland.VclDbxCds
dsnap | Borland.VclDSnap
dsnapcon | Borland.VclDSnapCon
vclactnband | Borland.VclActnBand

Borland.VclActnBand Packages are now installed by using ComponentInstalled .NET Components.NET VCL Components.

New Language Features

Several new features have been added to the Delphi language to support programming concepts and features of the .NET platform and the CLS:

- Partitioning code into namespaces
- New visibility specifiers for class members
- Class static methods, properties, and fields
- Class constructors
- Nested type declarations within classes
- Sealed classes
- Final virtual methods
- Operator overloads in classes
- .NET attributes
- Class helper syntax

Programming in the garbage-collected environment of .NET brings a number of new issues related to allocating and disposing of objects. These issues are discussed in Memory Management Issues on the .NET Platform.
Porting Web Service Client Applications

The .NET Framework employs a major architectural shift in how it handles web services and web service clients. Your existing web service client applications need to be modified to operate on the .NET Framework. RAD Studio does not support the RIO components, and uses a more transparent .NET approach to managing web service client applications. You will need to eliminate RIO components and modify the way you access WSDL documents.

See Also

VCL.NET Overview

Language Issues in Porting VCL Applications to Delphi for .NET

Using Platform Invoke with Delphi for .NET

Porting Web Service Clients to Delphi for .NET

Porting a Delphi for Win32 Web Service Client Application to Delphi for .NET

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!