Under OS/2 Version 2.0, 32-bit applications may make use of existing 16-bit application code and resources; this practice is known as mixed model programming. For example, a 32-bit Presentation Manager application may access an object window procedure contained in a 16-bit DLL created for OS/2 Version 1.3. This capability allows 32-bit applications to make use of existing application objects, avoiding the necessity to rewrite existing object libraries to accommodate the 32-bit programming environment.
Applications that make use of 16-bit modules and resources must be aware of the particular characteristics of the 16-bit environment, which affect the way that application modules interface with one another and pass parameters or messages. Such characteristics include:
Obviously, conversion of pointers and possible realignment of memory objects is required when passing control between 16-bit and 32-bit modules. This conversion between addressing schemes is known under OS/2 Version 2.0 as thunking. Thunking is performed using a simple algorithm known as the Compatibility Region Mapping Algorithm (CRMA). This algorithm, along with sample code, is described in OS/2 Version 2.0 - Volume 1: Control Program.