Migrating is easier than you think!

by Dec 26, 2017

As an Embarcadero Software Consultant, I’m often asked to help migrate legacy Delphi and C++ Builder code to the current versions. Developers have commented that their migrations were easier than they thought! Here are two recent Code Rage Sessions showing Migrating your C++Builder Projects to Unicode and another session on Delphi Application Migration.

The Migrating your C++Builder Projects to Unicode session focused on helping you migrate your legacy C++ Builder Apps to Unicode.  At Embarcadero, over time, we have learned tips and techniques to help with your Unicode migration.  Once you get a handle on these tips and techniques, developers have reported it didn’t take long to convert their applications and the applications migrate fairly smoothly.
In this session, we look at working with Unicode in C++ Builder.  As you know, for string data type, C++Builder offers several choices; your code can use C-style characters and strings, or C++ string objects, or VCL String objects, and each of these has its own set of Unicode variations. Also, the Windows API provides both ANSI and Unicode variants.
We look at the new C and C++ data types for C-Style strings (wchar_t, char16_t, char32_t ).
We look at the new Unicode VCL string classes. Starting with RAD Studio 2009, the VCL offers several string classes which support ANSI, UTF-8, and UTF-16 encodings.  We’ll see that most member functions of these new VCL string classes operate just the same as they did for the before Unicode String class. 
We look at how to use the “_TCHAR maps to “ option that determines whether or not the UNICODE preprocessor macro is defined, and that determines whether you get the ANSI variant or the wide-string (UTF-16) variant.
We look at the standard Windows header tchar.h that includes macros designed to let you write code that compiles as either ANSI or Unicode. We’ll see how this can help when converting code one portion at a time.  We’ll see how this header is valuable to write character-width-agnostic code that can compile as ANSI or Unicode, and that lets you prepare for the migration in your previous versions of C++Builder without breaking compilation. 
We look at converting text to and from Unicode, because we need to know how to convert between the various Unicode encodings and the various ANSI encodings. We’ll see the two easiest ways of doing this are using the Windows API and using the VCL. 
And lastly, we look at how to load and save Unicode characters to files, because you can use Unicode characters with VCL components like TMemo, TListBox, TCombox, TEdit, etc, so we need to know if any modifications are needed to our C++ Builder programs to handle Unicode characters for these components.
In the Delphi Application Migration session, we learn how to migrate from older editions of Delphi with some examples of what to look for and how to update your code (including tools and resources to help you along the way).

The session focuses on these five areas for migrating legacy Delphi to the current Delphi versions:

• Migrating 3rd Party Components / Libraries 

• Migrating Unicode 

• Migrating Database Access (FireDAC)

• Migrating of Middleware 

• Move from MIDAS (DCOM) to DataSnap

• Mida – Convert VCL to FireMonkey (FMX)

First, we discuss migrating 3rd party components and Libraries.

Then, Mr. Terry Ditzler, from the DSW Group covers migrating Unicode and shows how to use the Delphi Unicode Statistics Tool to estimate time and effort for the Unicode Migration, and show some examples on how to modify non-Unicode code to Unicode Delphi code for the various Delphi types (like CHAR, STRING, READ, Pointer, Length, and MultiByteToWideChar for example).

For Migrating Data Access, we hear from David I, the former Embarcadero V.P of Developers Relations, on how to use the Delphi reFIND tool to migrate off of some of the older data access libraries, like the BDE, or AnyDAC or dbExpress to the newer, more performant FireDAC data access library.

For Migrations of Middleware, just in case some of you have Midas (DCOM) apps, we’ll show the resources to move from Midas (DCOM) to the newer DataSnap middleware.

And lastly, to convert your VCL applications to FireMonkey, for when you have the need to target multi-device platforms, like Windows 32, Windows 64, Mac OS X, iOS, Android, and Linux, you’ll be able to leverage your existing VCL Windows applications and create multi-device, true native applications.  The Mida – VCL to FireMonkey Converter tool will help you to convert your VCL applications to FireMonkey applications.  The Mida Converter is a 3rd party IDE extension that automates some aspects of migrating VCL applications to FireMOnkey Applications.


In general, migrating your legacy RAD Studio, Delphi and/or C++ Builder projects is easier than you think!

And Embarcadero is here to help you with your migrations!  Embarcadero has created a new Migration and Upgrade Center Web page.

This Upgrade and Migration Center is here to help you navigate your migration from older editions to the newer current editions.

We really want to know how you are doing with your legacy Delphi and C++ Builder migrations, so please try using the “Talk to Migration Specialist today button”, that will get you in contact with an Embarcadero resource to help with your migration and help answer any migration questions:

Talk to a migration specialist today

The web page focuses on these 4 main areas of Migration;

  • Unicode,
  • Migrating to 64bit,
  • Migrations of Database and Middleware, and
  • Migrating 3rd Party Components / Libraries,

with each section providing tools and resources to help with your legacy code migration.

[DownloadButton Product=’RAD’ Caption=’Start for Free’]