Readme - Release Notes for CodeGear RAD Studio 2007
By: Dee Elling
Abstract: Important supplementary information for the RAD Studio 2007 release containing Delphi 2007 for Win32, .NET, and C++Builder.
This file contains important supplementary information that might not appear in the main product documentation. CodeGear recommends that you read this file in its entirety. For an updated version of these Release Notes, see the CodeGear Developer Network (http://dn.codegear.com/article/36858).
This document refers to "the product" when the information applies to all three personalities in CodeGear RAD Studio 2007: Delphi 2007 for Win32, Delphi 2007 for .NET, and C++Builder 2007.
For information about installation, deployment, and licensing issues, see the Install, Deploy, and License files located, by default, at C:\Program Files\CodeGear\RAD Studio\5.0.
Before installing, uninstalling, or upgrading the product, see the INSTALL and LICENSE files for detailed information about installation and licensing issues. Also see the Installation FAQ, located at: http://dn.codegear.com/article/36523. The INSTALL.htm file gives the system and free space requirements for installing RAD Studio 2007, as well as installation and upgrade procedures.
Where to find the INSTALL.htm file:
After installation, the INSTALL.htm and LICENSE.rtf files are located by default at:
C:\Program Files\CodeGear\RAD Studio\5.0\
Installing products in the wrong order can cause problems and should be avoided. For example:
Exception EPackageRegistrationException in module coreide100.bpl at 000DB245. Registration procedure, Cppproject.IDERegister in package C:\Program Files\Borland\BDS\4.0\Bin\bcbide100.bpl raised exception class EOleSysError: OLE error 80131040, ClassID: {F8FEDD39-E3CE-4B8D-A657-9CA24686881F}
In this case, the assembly is registered incorrectly in the BDS2006 install. If .NET 2.0 and .NET 1.1 coexist on the system, the system cannot load borland.studio.toolsets.dll. The workaround involves forcing the assembly loader to use .NET 1.1 for this assembly. For more information, see:
http://qc.codegear.com/wc/qcmain.aspx?d=28728
http://qc.borland.com/wc/qcmain.aspx?d=22108
http://support.codegear.com/article/36047
Do not install Delphi 2007 for Win32 or C++Builder 2007 from an original release DVD after you install CodeGear RAD Studio 2007. The result is that neither product gets installed.
The installer does not warn you when there is not enough free space to install the product. Approximately 2 GB of free space is needed on the C: drive to install RAD Studio (even if you are installing to a different drive). If there is insufficient space, the installer might hang.
After uninstalling CodeGear RAD Studio 2007, some system files/settings are removed and prevent any subsequent .NET 2.0 uninstall or repair until you reboot.
Top
Select Component>Install Packages.
Add "indy;" at the beginning of the runtime packages list, as follows:
indy;vcl;rtl;bcbie;vclx;vclactnband;xmlrtl;bcbsmp;dbrtl;vcldb;bdertl;vcldbx;dsnap;dsnapcon;teeUI;tee;teedb;vclib;ibxpress;adortl; dbxcds;dbexpress;DbxCommonDriver;IndyCore;IndySystem;IndyProtocols;inet;IntrawebDB_90_100;Intraweb_90_100;VclSmp;vclie;websnap;webdsnap;inetdbbde;inetdbxpress;soaprtl
Software\Borland\BDS\5.0\Globals
Add (or update if it already exists) a string value called ForceEnvOptionsUpdate. Assign it a string value of "1." When this registry key has a value of "1," the next time the IDE runs, it updates the EnvOptions.proj file on disk to include the path(s) that your installer added. The EnvOptions.proj file is the mechanism by which the new MSBuild build engine in the IDE is able to include paths that are listed on the Library - Win32 page in the IDE's Tools>Options dialog.
If your installer updates any of the following registry keys, it should also add or update the Globals\ForceEnvOptionsUpdate key:
The legacy WinHelp viewer (WinHelp.exe) is not implicitly registered by RAD Studio. If you want to use .HLP files from an application, you need to add the WinHelp viewer to the uses list of any unit included in the application.
To download the WinHelp viewer, visit the Microsoft website:
If you dynamically load a DLL, you can't link dynamically with the runtime library. Otherwise, an Access Violation occurs when the program terminates. The workaround is to not check Dynamic RTL in the Linking section in Project Options on the Linker\Linking page.
The C++ library GdiPlus cannot be used in non STRICT mode, since it requires that Graphics::Graphics(HDC) be distinguishable from Graphics::Graphics(HWND). In non STRICT mode, both HWND and HDC are "void*". Otherwise, you get the error:
The Register and Unregister menu items are not enabled if you open and run an ActiveX library project in C++ Builder 2007 that was created with C++ Builder 6. The work around is to go to Run>Parameters and set Host application to "C:\windows\system32\regsvr32.exe" and the Parameters to <ProjectName>.
To enable your ASP.NET 2.0 applications to query or create virtual directories on an IIS 7.0 web server running under Vista:
Assemblies are built for 32 bit by default, so they will not run under an IIS virtual directory configured for 64 bit. If you are running an ASP.NET 32-bit application under Vista and are using IIS on a 64-bit operating system, use the following workaround:
To debug an ASP.NET application on the IIS web server in Vista, you must add the following directives to your project's web.config file:
http://dn.codegear.com/article/36770
http://cc.codegear.com/
The C++ runtime libraries have been enhanced and altered to be more current, and the standard C++ libraries from Dinkumware have been updated to version 5.01. Because of these changes, the binary objects generated by the compiler in C++Builder 2007 might differ in some cases from previously compiled versions. The incompatibilities are mainly restricted to the C++ standard libraries. There are no changes in the basic C++ application binary interface (ABI).
The Delphi compiler (DCC32) previously generated the following code in the .hpp file when an interface parameter had the default value of nil:
void methodName(_di_IIntf param = (void *)(0x0));
Previously the C++ compiler incorrectly accepted this syntax.
In this release, both the Delphi compiler and the C++ compiler handle this case differently.
The Delphi compiler now emits code like this in the .hpp file for an interface parameter with a nil default value:
void methodName(_di_IIntf param = _di_IIntf());
now fails to compile, emitting the error:
Cannot convert 'void *' to '_di_IIntf'
If you have Delphi code containing an interface parameter with a nil default value, recompile it with DCC32. If you do not have the source, edit the .hpp file and modify all occurrences like this
to this:
If you want to generate .hpp files (and the corresponding .obj) from a .pas file, you should use dcc32.exe with the -JPHNE switch. Or use -JL on the .dpk file containing the .pas file.
To use WinHelp in a C++ application:
void LinkWinHelp()
{
# pragma startup LinkWinHelp 66
if (WinHelpTester != NULL)
WinHelpTester->GetHelpPath();
}
To more closely obey the rules of the C++ ANSI Standard, the C++ compiler shipping with C++Builder 2007 is stricter than previous versions. Code that did not generate errors in earlier versions of C++Builder might fail to compile with C++Builder 2007. This section lists some of the common areas where the compiler is stricter. Each case is illustrated with an example showing the problem and how to update the code to compile with C++Builder 2007. Note that there are often many ways to bring offending code up to date. The appropriate method depends on the intent of the original code.
There are many constructs that now generate error messages with the C++ compiler included with C++Builder 2007. The rules governing this are described in section 8.5.3 of the 2003 C++ ANSII standard. They fall in the following categories:
Previous versions of the Borland C++ compilers allowed various forms of binding to non-const reference parameters. In the following example, for instance, one was allowed to simply cast the psize parameter:
int takesLongRef(long& l);
int takesUnsignedPtr(unsigned long* psize) {
With C++Builder2007, the above code generates these errors:
Error E2357 test.cpp 3: Reference initialized with 'long', needs lvalue of type 'long' in function takesUnsignedPtr(unsigned long *)
To remedy this, you can cast psize before dereferencing, as in:
Be aware of cases that involve temporaries in unobvious ways. For example, some binary operators imply a temporary:
enum { zero, one, two } num;
Another case that involves temporaries in an unobvious way is the return value of a property. The following example illustrates code that compiled with previous versions of the compiler:
#include <vcl.h>
With C++Builder 2007, the above generates two errors:
Error E2357 test.cpp 14: Reference initialized with 'const WideString', needs lvalue of type 'WideString' in function test() Error E2342 test.cpp 14: Type mismatch in parameter 'wref' (wanted 'WideString &', got 'WideString') in function test()
You can fix this by changing the reference to a const reference, as in:
void Func(const WideString& wref);
Here is an example of trying to bind a const object to a non-const method:
The temporaries and references issue referred to above is encountered in code generated by previous versions of the Reconcile Error Dialog Wizard. To remedy this, look for the VarToAnsiStr method
and change it to take a const Variant&, as in:
AnsiString VarToAnsiStr (const Variant &V, TFieldType DataType)
String literals are now considered to be of type 'const char[]' by default. This, combined with the stricter qualification binding of const values and types, can generate error messages in code that compiled before.
You may enable the -Vbs switch to revert string literals to non-const. However, CodeGear recommends that you update the code instead.
Note that the change in the type of string literals can also change how the compiler resolves calls to overloaded methods. The following example illustrates this:
void foo(char *); void foo(const char *); foo("string"); // New Compiler picks foo(const char *)
The C++ compiler no longer allows an explicit template without the 'template <>' prefix. Use the compiler switch -Vbe to allow this. The following example shows this:
template<class> class foo { foo(); }; foo<int>::foo(); // Error template<> foo<int>::foo(); // OK
Also, the C++ compiler no longer allows explicit template specialization within a class. Use the compiler switch -Vbx to allow this. For example, this generates an error:
struct S {}; struct SP { template <typename T> void foo(const T &) {} template <> void foo(const S &) {} // Error };
One of the areas where the C++Builder 2007 compiler differs the most from the previous version is in overload resolution, which includes the detection of ambiguity. The compiler now better conforms to the rules in section 13.3 of the 2003 C++ ANSI Standard. Several constructs that were previously allowed might now be reported as ambiguous or no match found, requiring that you modify code to clarify its intent.
The compiler option to revert to the old behavior, not enforcing the new stricter behavior, is -Vbo. However, not all compiler changes can be controlled by this switch, so CodeGear recommends that you update the code instead.
The following is an example of an ambiguity that was permitted by the previous compiler:
class X{}; void foo(X); void foo(const X&); void ambig() { X x; foo(x); //error-ambiguous-the previous compiler chose 'void foo(x)' }
The standard abs function might also generate an ambiguity message when invoked with a parameter that does not exactly match the types expected by the various overloaded versions of abs. Here is an example:
#include <limits> bool test(long l) { return std::abs(l) > 0; }
The code above generates an error and a warning:
Error E2015 test.cpp 5: Ambiguity between 'std::abs(int) at C:\dev\tp\sc\include\math.h:208' and 'std::abs(long double) at C:\dev\tp\sc\include\math.h:275' in function test(long) Warning W8057 test.cpp 6: Parameter 'l' is never used in function test(long)
To fix this, cast to the type of the overload you wish to invoke. For example,
#include <limits> bool test(long l) { return std::abs(static_cast<int>(l)) > 0; }
The compiler now obeys the rules of 8.5.1 and 13.3.1 of the 2003 C++ ANSI Standard for initialization and conversion:
For an explicit cast, the compiler now performs direct initialization on a temporary.
This example illustrates the new behavior:
// In this example, dst is destination type and src is source type class A { }; class V { public: V() { }; V( const V & ) { } V( const A & ) { } }; class G { public: G() { } operator V() { } operator A() { } }; G g; V v; // direct initialization // ==> constructors are considered. V v9(g); // Both of these statements previously compiled but now get the error: // Error E2015: Ambiguity between 'V::V(const V &)' and 'V::V(const A &)' // casts // (V)g is treated as V tmp(g) which is direct initialization of 'tmp' // ==> constructors are considered. (V)g; static_cast<V>(g); // Both of these statements previously compiled but now get the error: // Error E2015: Ambiguity between 'V::V(const V &)' and 'V::V(const A &)' // copy initialization with dst=V src=G // ==> user-defined conversion sequences are considered. V v4 = g; V v5 = G(); // Both of these statements now compile but previously got the error: // Error E2015: Ambiguity between 'V::V(const A &)' and 'V::V(const V &)' // copy initialization with dst=V src=V // ==> converting constructors of V are considered. V v6 = (V)g; V v7 = V(g); // Both of these statements compiled previously but now get the error: // Error E2015: Ambiguity between 'V::V(const V &)' and 'V::V(const A &)'
5.1 Conversion via user-defined operators
The new C++Builder 2007 compiler often reports ambiguities for conversions that involve user-defined operators. An example is shown below:
class AnsiString { public: bool operator ==(const AnsiString& other); AnsiString(const wchar_t* src); }; class Variant { public: operator AnsiString() const;/br> operator wchar_t*() const; bool operator ==(const AnsiString& rhs) const { return static_cast<AnsiString>(*this) == rhs;} };
C++Builder users might notice that the above is a stripped down version of the VCL AnsiString and Variant classes. Previous versions of the compiler invoked the 'Variant' 'operator AnsiString() const' for 'static_cast<AnsiString>(*this)', while C++Builder 2007 uses 'conversion via constructor'. Since the Variant can be converted to multiple types for which there are AnsiString constructors, the compiler generates an ambiguity error.
To correct this error, you must eliminate the cast as in:
bool operator ==(const AnsiString& rhs) const { return (*this) == rhs;}
You can also be explicit about the operator:
bool operator ==(const AnsiString& rhs) const { return this->operator AnsiString() == rhs; }
5.2 Variant/OleVariant/AnsiString/WideString/TDateTime
The issue described above with a user-defined conversion operator vs. conversion via constructor might be encountered in several constructs involving the VCL classes Variant, OleVariant, AnsiString, WideString, TDateTime, Currency, and so forth. The following table lists constructs that now generate error messages and the updated syntax.
The underlying compiler change for the errors described above is related to the way the compiler now handles initialization and conversion.
These are the environment variables set by the RAD Studio Command Prompt for using the CodeGear RAD Studio tools, especially MSBuild:
If you want to use MSBuild on the command line but are not using the RAD Studio Command Prompt, you should set these environment variables yourself.
If you have been using dbExpress with Delphi 2007 for Win32, and you upgrade your copy of Delphi 2007 for Win32, you do not need to make any source code changes. However, you do need to recompile any code that uses the SQLExpr or DbxCommon units, two units that have changed since the first shipment of Delphi 2007 for Win32.
The new MySQL dbExpress driver, dbxmys30.dll, was tested against LibMySQL.dll from a 5.0.xx server install. If you intend to use dbExpress against MySQL 4.0.xx, you should either upgrade your LibMySQL.dll to a 5.0.xx version or use the dbxmysA30.dll driver with dbExpress. Using an older version of LibMySQL.dll with the current dbExpress driver for MySQL can result in unexpected behavior.
An error message is displayed when trying to expand a table node from Data Explorer using LibMySQL.dll (4.x version):
The following combinations have been tested:
If you wish to use the DBXMysA30 driver, you can both rename the DBXMys30.dll to DBXMys30.dll.bkup and DBXMysA30 to DBXMys30.dll. Alternatively, you can add a new entry to the dbxdrivers.ini file that defines DBXMysA30.dll as the LibraryName.
Delphi database driver Framework. This is an object oriented driver Framework written in Delphi.
Delegate driver support. A delegate driver is a driver between the application and the actual driver. Delegate drivers allow for pre and post processing of all public methods and properties of the dbExpress 4 Framework. Delegate drivers are useful for connection pooling, driver profiling, tracing, and auditing. Delegate drivers are easy to implement. See the source documentation at the beginning of the DBXCommon unit for more information.
TDBXPool delegate driver. Provides connection pooling for any dbExpress driver.
TDBXTrace delegate driver. Provides enhanced tracing capability. Produces Delphi code for all traced methods and properties.
Extensible Commands. Commands that are not SQL statements or stored procedures are supported by specifying a custom "command type" property. This property is a String allowing driver and delegate driver implementers to introduce their own command type namespace of custom commands. The TDBXPool delegate driver leverages this capability to implement a "show pools" command, which returns a reader with information on the current state of all connection pools.
Source code documentation. Works with help insight for all public methods, properties, and events. XML/HTML documentation can also be generated using the --doc Delphi compiler switch.
Single source. dbExpress 4 source code can be compiled for both Win32 and .NET platforms.
dbExpress 4 source code. Full source code is provided for the dbExpress 4 Framework.
Dual interfaced drivers. All CodeGear dbExpress drivers implement the older dbExpress 3 and newer dbExpress 4 interfaces.
dbExpress 3 adapter driver. The dbxadapter30.dll DLL provides a dbExpress 4 interface for existing dbExpress 3 drivers. This allows applications to still use older non-CodeGear dbExpress 3 drivers with dbExpress 4.
The unified code base is much easier to read, debug, and maintain.
VCL now accesses dbExpress database drivers using the new dbExpress 4 Framework.
Both Unicode and ANSI drivers ship with dbExpress. The Unicode version is dbxoraW30.dll and the ANSI version is dbxora30.dll.
dbExpress 2.5 is no longer supported in this release.
The new MySQL driver is called dbxmys30.dll. This driver supports Unicode strings. This driver works only with the version of MySQL's libmysql.dll for MySQL 4.1 and 5.0 servers. dbxmys30.dll does not work with older versions of libmysql.dll.
The old MySQL driver is still included in the product but has been renamed to dbxmysA30.dll. The "A" has been added to the DLL name to signify that this older driver only supports ASCII strings, not Unicode. dbxmysA30.dll can only be used with versions of MySQL's libmysql.dll that support MySQL servers version 4.0 and below.
Project|Options|Packages must have the Build with runtime packages option checked. DbxCommonDriver100.bpl must be deployed with your application. As with prior releases, if your application uses any of the DBX*.dll dynalink dbExpress drivers, they also must be deployed.
For the most part, the product maintains unit interface compatibility with BDS2006. However, the dbExpress VCL breaks this compatibility in three units: SQLExpr, DBXpress, and SQLConst. Only SQLExpr contains components. DBXpress has been deprecated. To avoid conflicts with the BDS2006 version of dbExpress100.bpl, dbExpress100.bpl has temporarily been renamed dbExpress4100.bpl. The "4" signifies that this version of the dbExpress package is for version 4 of the dbExpress drivers. When version 11.0 of the VCL ships, the normal VCL naming convention will be resumed and dbExpress4100.bpl will be renamed dbExpress110.bpl.
*Driver not fully certified with this version of the database.
The linker automatically eliminates unused functions in all units when building the executable. To ensure that all functions are available to the evaluator during debugging, do the following:
For information about debugging ASP.NET applications that use IIS on Vista, see the ASP.NET Notes.
The help viewer accessed from inside the product will always include the local help for the product. But you can choose specific other help volumes (such as MSDN Online) to be used in search and index functions. You can limit your search to local help provided by CodeGear. You can also specify that the help viewer is to either display local help first or display online help first.
To avoid this error, create or update the following registry entry:
HKEY_CURRENT_USER\Console\LoadConIme
This entry is type REG_DWORD and you should set its value to 0.
To add this design-time package to an existing .PAS file that contains components, right-click the Contains node under your package and select Add.
The New VCL Component Wizard places both design-time and runtime code into a single unit. The runtime code is the code that implements the component itself. The design-time code is the Register procedure with the call to RegisterComponents which should be removed and placed in a different unit which belongs in a design time package.
In the first scenario above, it would be wise to create a second, design-time only package and split the code as described. Additionally, you should mark your packages explicitly as design-time and runtime using Usage Options from the Project Options dialog box. Mixing design-time and runtime code in a single package is a bad idea and needs to be avoided. Design-time code isn't necessary at runtime and typically contains property and/or component editors along with various registration calls that are only meaningful when the package is installed in the IDE.
The default Delphi SOAP Server application with Web App Debugger class does not compile. There are two possible workarounds:
Copyright 2007 CodeGear Software. All rights reserved.
Published on: 9/10/2007 10:14:10 AM
Server Response from: BDN10A
Release Notes for CodeGear RAD Studio 2007
Contents
Installing, Uninstalling, and Upgrading Your Product
General Notes
Known Problems
Cannot Use Dynamic Link RTL if Dynamically Load DLL
Must Turn off NO_STRICT #define with GdiPlus library
ActiveX
ASP.NET Notes
Blackfish SQL Notes
Windows VistaTMNotes
C++Builder and C++ Compiler Notes
Possible Binary Incompatibility with Previous Version of C++ Compiler
Delphi Interface Parameter with Default Value of nil Handled Differently Assigning the Type void * to Delphi Interface Now Fails to Compile
Selecting Both of the Symbol Reference Info Options for Delphi Code
Specifying WebSnap Directories
Location Change for Precompiled Headers
Generating C++ Files from the Delphi Compiler
Using the Delphi DesignIntf and DesignEditors Tools
Using WinHelp in C++ Applications
C++ Compiler Changes
Command Line Notes
Database Notes
Upgrading dbExpress for Delphi 2007 for Win32
New features
dbExpress 4 Framework
Single source dbExpress VCL components
New database Drivers
New Unicode enabled database drivers
Oracle dbExpress Unicode and ANSI drivers
Database Change Notes
dbExpress 2.5 not supported
New MySQL dbExpress driver
Delegate drivers
dbExpress VCL components
dbExpress application deployment for the Win32 platform
Using packages
Unit interface compatibility
Supported Servers
dbExpress
Debugger Notes
Documentation Notes
International Notes
Together Notes
VCL/RTL Notes
Creating and Installing a New Component into a New Package
Installing an Existing Component into a New Package
Installing Components into an Existing Package
Installing Existing Design-Time Packages
Using the New VCL Component Wizard
SOAP Server
Borland® Copyright© 1994 - 2008 Borland Software Corporation. All rights reserved. Contact Us | Site Map | Legal Notices | Privacy Policy | Report Software Piracy