This section describes how to migrate mixed-mode applications using Open32 and SMART. SMART provides a porting mechanism, and Open32 makes the porting process easier. It is essential to have a reasonable amount of understanding of both the Windows 32-bit and OS/2 Warp operating systems to port applications from one platform to another or create applications that can run on multiple platforms. By using Open32 and SMART, you might not need to learn about certain OS/2 topics, such as the Presentation Manager (PM), but you still need to be familiar with the unique characteristics of each operating system.
To port a mixed-mode Windows 32-bit application to OS/2 Warp, you must first analyze the existing Windows 32-bit application so that you can separate the common code from the platform-specific code within the Windows 32-bit application. Use SMART and the Open32 dictionary to analyze the Windows 32-bit application. The analysis identifies areas of code that can and cannot be converted using Open32. At this point, examine the code for possible ways of converting the platform-specific functions to Open32. Many times there are multiple Windows 32-bit functions implementing a single function. Open32 implements only the most commonly used Windows 32-bit functions. Often, the percentage of common source can be increased by modifying the original Windows 32-bit source to use the Open32 functions. However, there are some functions that Open32 does not support (for example, OLE) that must remain platform specific.
Use the SMART analysis to help you separate the Windows 32-bit common and platform-specific code.
When the code is separated, add a header change to the common code section so that you can successfully compile this code. This common code can call platform-specific functions as needed except for those functions mentioned in Common Code Support Caveats.