I have a C++ project in VS2010 and upgrade it in VS2013. I am using win7 os and it is working fine. The out put is an exe file and I tried to run this executable in Vista OS bu
See the documentation for EnumProcessModules specifically this part:
Programs that must run on earlier versions of Windows as well as Windows 7 and later versions should always call this function as EnumProcessModules. To ensure correct resolution of symbols, add Psapi.lib to the TARGETLIBS macro and compile the program with -DPSAPI_VERSION=1. To use run-time dynamic linking, load Psapi.dll.
Which basically means:
Use EnumProcessModules
in your code
Link to Psapi.lib
Set up PSAPI_VERSION=1
as a preprocessor definition