Data Types

A number of the function type declarations and data type definitions used by Presentation Manager map into different "standard" C language type definitions under OS/2 Version 2.0. This is due to the differences between the 16-bit architecture of previous versions and the 32-bit architecture of Version 2.0.

For example, the Presentation Manager data type EXPENTRY, used to declare exportable entry points, is defined under OS/2 Version 1.3 in the following way:

#define EXPENTRY     pascal far

However, the pascal linkage convention is not used in the 32-bit OS/2 Version 2.0 programming environment, since all function calls use the standard C calling convention. The only exception is when creating applications that access 16-bit functions; see Mixing 16-Bit and 32-Bit Application Modules.

In addition, far memory references are not used, since the 32-bit flat memory model allows addressability to all locations in the process address space. In the 32-bit programming environment therefore, the EXPENTRY type is defined as blanks; 32-bit applications are not required to use the EXPENTRY keyword.

The OS/2 header file os2.h provided with the IBM Developer's Toolkit for OS/2 2.0 provides transparent remapping of the Presentation Manager type definitions to their new C language equivalents, and thus no modification is required to existing functions and data definitions that use the Presentation Manager types. However, applications that have used standard C language type definitions in place of the Presentation Manager types will require modification. For this reason, it is recommended that all Presentation Manager applications should use the Presentation Manager function and data type definitions.


[Back: Application Migration]
[Next: Function Name Changes]