Entry point not found error in Vista OS(Vista 操作系统中未找到入口点错误)
问题描述
我在 VS2010 中有一个 C++ 项目,并在 VS2013 中升级它.我正在使用win7操作系统,它工作正常.输出是一个 exe 文件,我试图在 Vista OS 中运行这个可执行文件,但它崩溃并显示错误消息无法在动态链接库 KERNEL32.dll 中找到过程入口点 K32EnumProcessModules"我该如何解决这个问题?
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?
推荐答案
查看文档 EnumProcessModules
具体这部分:
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
设置为预处理器定义
Set up PSAPI_VERSION=1
as a preprocessor definition
这篇关于Vista 操作系统中未找到入口点错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Vista 操作系统中未找到入口点错误


基础教程推荐
- 这个宏可以转换成函数吗? 2022-01-01
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- 在 C++ 中计算滚动/移动平均值 2021-01-01
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 我有静态或动态 boost 库吗? 2021-01-01
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 常量变量在标题中不起作用 2021-01-01
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
- 如何在 C++ 中初始化静态常量成员? 2022-01-01