DOCUMENT:Q103719 27-JUL-2001 [visualc] TITLE :INFO: Migrating Visual C++ for Windows to Windows NT PRODUCT :Microsoft C Compiler PROD/VER:WINNT:1.0,2.0,2.1,4.0,5.0 OPER/SYS: KEYWORDS:kbGenInfo kbVC kbVC100 kbVC200 kbVC210 kbVC400 kbVC500 kbArtTypeINF ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual C++, versions 1.0, 2.0, 2.1, 4.0 - Microsoft Visual C++, 32-bit Enterprise Edition, version 5.0 - Microsoft Visual C++, 32-bit Professional Edition, version 5.0 ------------------------------------------------------------------------------- SUMMARY ======= 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 .RC2 file includes VER.H, which has been changed to WINVER.H for Windows NT, so this must be modified. MORE INFORMATION ================ 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: 1. Import your application files into a new project. 2. Remove VBX controls. 3. Remove Windows for Pen Computing extensions. 4. Remove AFXDLL. 5. Change VER.H to WINVER.H. 6. Replace difficult-to-port code, such as assembly language functions and MS-DOS calls, with stubs. 7. Build your 16-bit application with Visual C++ for Windows NT and note any 32-bit related problems. 8. Use the information in the Porting and Upgrading sections to correct any problems. 9. 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. Additional query words: ====================================================================== Keywords : kbGenInfo kbVC kbVC100 kbVC200 kbVC210 kbVC400 kbVC500 kbArtTypeINF Technology : kbVCsearch kbVC400 kbAudDeveloper kbvc100 kbVC500 kbVC200 kbVC210 kbVC32bitSearch kbVC500Search Version : WINNT:1.0,2.0,2.1,4.0,5.0 Issue type : kbinfo ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2001.