在Vista OS中找不到入口点错误 [英] Entry point not found error in Vista OS

查看:86
本文介绍了在Vista OS中找不到入口点错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2010中有一个C ++项目,并在VS2013中对其进行了升级.我正在使用win7 os,它工作正常.输出是一个exe文件,我尝试在Vista OS中运行此可执行文件,但由于显示以下错误消息而崩溃,该错误消息为:过程入口点K32EnumProcessModules无法位于动态链接库KERNEL32.dll中" 我该如何解决这个问题?

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 but it crashed with showing an error message as "The procedure entry point K32EnumProcessModules could not be located in the dynamic link lybrary KERNEL32.dll" How can I fix this issue?

推荐答案

请参见

See the documentation for EnumProcessModules specifically this part:

必须在Windows的早期版本以及Windows 7和更高版本上运行的程序应始终将此函数称为EnumProcessModules.为确保正确解析符号,请将Psapi.lib添加到TARGETLIBS宏,然后使用-DPSAPI_VERSION = 1编译程序.要使用运行时动态链接,请加载Psapi.dll.

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.

这基本上是指:

在代码中使用EnumProcessModules

链接到Psapi.lib

PSAPI_VERSION=1设置为预处理器定义

这篇关于在Vista OS中找不到入口点错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆