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.
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:
The Application Compatibility Toolkit will help you spot issues your application might have porting to Vista/Win 7:
I'd second Michael Burr's suggestion to use the AppCompat toolkit, as that will spot most of the likely problems. Some general rules of thumb:
c:\\windows
, c:\\program files
, etc. If you do need to write data that has to be available to all users, use CSIDL_COMMON_APPDATA
( c:\\ProgramData
by default) Assuming that you do most of these things right anyway then I would think you won't have any major issues supporting Vista/Win7.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.