These labs provide best known methods for porting your application. Sample Code is included for you to try out the concepts. You will need access to an Itanium® 2-based system to practice the lab concepts.
Lab 1: Data Model Considerations
Code Samples for Lab 1 (66262_66262.zip)
This lab will introduce new 64-bit data types and “polymorphic” data types, types that are 64-bit when compiled for the Itanium architecture but 32-bit for IA-32 targets.
- Learn how to use these types and four new Windows API functions, to write code that is platform-independent.
- While platform-specific code can largely be avoided by using new types, you will learn how to use conditional compilation to isolate platform-specific code when needed.
- Lastly, this lab will show how to use new format specifications to format 64 bit types.
Lab 2: Porting Pointers
Code Samples for Lab 2 (66263_66263.zip)
This lab will present guidelines for porting pointers. In the same way that code which assumes a particular pointer size is dangerous, code that uses hard-coded offsets to access a member in a structure is equally unsafe.
- You will learn how to fix code that uses hard-coded structure offsets.
Lab 3: Managing Data Size
Code Samples for Lab 3 (66532_66532.zip)
Migrating your application from 32-bit to 64-bit will impact your data size in a number of ways. This lab will review methods and considerations for managing data size. You will learn:
- Alternatives to using 64-bit pointers to track the location of data that can save system resources.
- How to modify structures to minimize extra padding.
- How to determine the appropriate type to use to represent integer data.