Search code examples
c++windows-7windows-vistawindows-xpporting

Porting C++ Application From XP to Vista/7


I have a C++ application that I have written for Windows XP, and I would like to port it for use on Windows Vista/7. It uses some MFC (for serial I/O) and ATL (for WMI), but it primarily uses the good ol' fashioned Windows API. What are some of the got-yas I should keep in mind when porting my application? Thanks.


Solution

  • You probably don't need to do anything at all. In general, applications written for XP run fine on Vista and Windows 7. (Device drivers and other such low-level code may be a different story.)

    Are you having problems running it on Vista or Windows 7? Have you even tried?

    Some possible gotchas:

    • security (does your app assume it is running as Administrator and has complete control over the machine?)
    • cosmetic issues (due to changes in window and control appearance in Vista and 7)
    • hard-coded file/directory paths
    • a lot more users run 64-bit versions of Windows Vista and 7 than ever used 64-bit XP. So if you have a 32-bit app and you dynamically load code (DLLs, ActiveX controls, etc.), you may run into 32-vs.-64-bit issues.