You are currently offline, waiting for your internet to reconnect

The Run-time Type Information library for the Pocket PC 2003 SDK is available

This article has been archived. It is offered "as is" and will no longer be updated.
To provide developers with full Microsoft eMbedded Visual C++ Exception Handling and dynamic cast support on Microsoft Windows Powered Pocket PC 2003 devices, Microsoft is distributing the Run-time Type Information (RTTI) library for the Pocket PC 2003 SDK.

The following file is available for download from the Microsoft Download Center:

DownloadDownload the RITTI.exe package now.

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

The RTTI.exe download includes the library files (.lib) and program database files (.pdb) for the "ArmV4" and "emulator" builds.

To use the RTTI library in a Pocket PC 2003 project, follow these steps:
  1. Copy the Ccrtrtti.lib and Ccrtrtti.pdb files from the ArmV4 and Emulator folders in the download to the folders that are named ArmV4 and Emulator inside the \Lib folder of the Pocket PC 2003 SDK.

    Note By default, these directories are found in the C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Lib\ArmV4OrEmulator folder on desktop computers that have the Pocket PC 2003 SDK installed.
  2. For all project configurations that you intend to target, include Ccrtrtti.lib in Project Settings of eMbedded Visual C++ 4.0, follow these steps:
    1. In eMbedded Visual C++ 4.0, click the Link tab in the Project Settings dialog box.
    2. Type Ccrtrtti.lib in the Object/Library modules box.
    3. Click OK.
  3. Follow these steps:
    1. In the Project Settings dialog box, click the C/C++ tab.
    2. Add the /GX switch in the Project Options list. You need this switch to compile exception handling code in the project.

      Note If the project uses dynamic cast, add the /GR switch.
More information
C++ Exception Handling code that uses "throw" constructs, "catch" constructs, or both with data types requires RTTI support to identify the type of exception. Without the RTTI library, typed C++ Exception Handling code causes a linker error message that is similar to the following error message:

error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
For example, without the RTTI library, the following code causes the previous linker error:
try{    // The code here can raise exceptions.}catch(int i){    // Optional exception handling logic goes here.}
The linker returns the error because it cannot find the RTTI library that is required for type-identification of exceptions of type int.

The same logic applies to "throw" constructs that involve any data.For example, the statement
throw 1;
requires RTTI to determine the matching "catch" block that would handle exceptions with int values.

Without the RTTI library, the only exception handling construct that works is the kind that involves no data types. For example, the following code links without the RTTI library without causing an error message:
try{    // The code here can raise exceptions.}catch(...){    // Generic exception handling logic goes here.}
With the RTTI library files, all the C++ Exception Handling constructs (typed and un-typed) that are in this section of this article should generate correct executables. You do not have to have extra DLLs because the RTTI logic is already in the DLLs that are on the Pocket PC 2003 device and emulator.

The following is a known problem with eMbedded Visual C++ 4.0 Service Pack 2 (SP2) when you use this RTTI library. Single-stepping through the code over the closing brace after the last logical statement in the try/catch block in an application would cause the following events:
  • A crash occurs in the executable of the application on the Pocket PC 2003 emulator.
  • The application stops responding (hang) on the Pocket PC 2003 device.
At the point of the crash or when the application stops responding (at the end of the try/catch block), the eMbedded Visual C++ IDE will report an access violation with the following error message:

First Chance exception
Microsoft is aware of this problem and is working toward fixing this problem in a future release.

The workaround to this problem is to set a breakpoint at the first statement after the end of the try/catch block and then to let the application run through the end of the try/catch block and continue debugging at the breakpoint. Do not single-step through the code after you have reached the last logical statement in the try/catch block.

The RTTI library files also provide support for dynamic casts. For example, without the RTTI library, eMbedded Visual C++ 4.0 will report a linker error with the following code:
struct A {    int a;    A() : a(1) {}    virtual ~A() {} // All the rest of destructors will be virtual. };void Test(){   A a;    A* a4 = dynamic_cast<A>(&a);}
The linker error looks similar to the following:

error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
error LNK2019: unresolved external symbol ___RTDynamicCast referenced in function "void __cdecl Test(void)" (?Test@@YAXXZ)
The dynamic cast code builds successfully with the inclusion of the RTTI libraries in the project.
type_info CPPEH eVC eVC++

Article ID: 830482 - Last Review: 12/08/2015 05:06:22 - Revision: 2.0

  • Microsoft Windows Mobile 2003 software for Pocket PC Standard Edition
  • Microsoft eMbedded Visual C++ 4.0
  • kbnosurvey kbarchive kbinfo KB830482