Microsoft KB Archive/103719
Article ID: 103719
Article Last Modified on 12/2/2003
- Microsoft Visual C++ 1.0 Professional Edition
- Microsoft Visual C++ 2.0 Professional Edition
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 5.0 Professional Edition
This article was previously published under Q103719
When porting a simple application built by AppWizard from Visual C++ for Windows to Visual C++ 32-bit Edition, a few changes are needed. Here are some helpful hints:
- The .MAK files are not compatible, so a new one must be created.
- The <PROJECT>.RC2 file includes VER.H, which has been changed to WINVER.H for Windows NT, so this must be modified.
In the Visual C++ version 5.0 Books Online, the Porting and Upgrading section of the Visual C++ Programmer's guide discusses some of the common issues concerning porting applications from Visual C++ for Windows (16-bit) to Visual C++ for Windows NT (32-bit). In the Visual C++ version 4.0, this information was in Books Online, the "Porting" chapter of the "Key Visual C++ Topics". In previous versions of Visual C++ 32-bit Edition, this information is covered in the help file MIGRATING.HLP which is accessible through the "Moving to Visual C++" help icon in the Visual C++ for Windows NT program group.
With version 5.0 the steps for porting a Microsoft Foundation Class (MFC) application are discussed in the Changes in MFC Versions in the Details section of the Porting and Upgrading topic. With 4.0 they are in the "Between MFC Versions" topic of the "Porting" chapter in the Visual C++ version Books Online. To find this information, search on "porting MFC applications." These steps are also addressed in the MFC.HLP file included with Visual C++ 32-bit edition versions 1.0 and 2.x. To access this information, select "MFC Help" and choose "Steps for Porting Framework Apps to 32-Bits."
With slight variation, the steps for porting a MFC application are:
- Import your application files into a new project.
- Remove VBX controls.
- Remove Windows for Pen Computing extensions.
- Remove AFXDLL.
- Change VER.H to WINVER.H.
- Replace difficult-to-port code, such as assembly language functions and MS-DOS calls, with stubs.
- Build your 16-bit application with Visual C++ for Windows NT and note any 32-bit related problems.
- Use the information in the Porting and Upgrading sections to correct any problems.
- Implement each stubbed function with portable code until the entire application runs correctly.
Further details on each step are provided in the online documentation or help files mentioned above.
Keywords: kbinfo kbarttypeinf KB103719