LoadLibrary失败带有错误4250:此操作仅在应用程序容器的上下文中有效
LoadLibrary fails with error 4250: This operation is only valid in the context of an app container
loadLibrary(" my.dll")在使用VS 2013中使用V120_XP工具集构建我的项目时返回正常。但是在使用V141_xp工具集(平台为7.1)的VS 2017上,它返回null和错误代码4250。我确保两次都进行干净的构建。
我无法踏入LoadLibrary(F11)。
执行该行后,ProcessMonitor在createFileMapping上显示锁定的文件,并在HKLM Software Microsoft Microsoft Windows Windows currentversion sidebyside sidebyside preferexternalManifest上锁定,但否则所有成功
dumpbin/标题对于my.dll的两个版本都相同
依赖性沃克(Walker)具有循环依赖性,未解决的导出等的错误,但是工作的2013版似乎具有相同的错误。使用VS 2017 my.dll具有额外的依赖关系UCRTBASED.DLL,vcruntime140d.dll。
my.dll在静态上链接,而不是boost 1.64&TBB,但两者都是没有任何Windows商店或通用选项的。我正在使用Windows 10和Cmake 3.8。生成VS解决方案的CMAKE文件没有更改。
这是依赖关系沃克个人资料:
LoadLibraryA("my.dll") called from "d:myprojectx64debugmy.EXE" at address 0x00007FF7FCED1DA2.
Loaded "d:myprojectx64debugmy.DLL" at address 0x00007FFA49D40000. Successfully hooked module.
Loaded "d:myprojectx64debugabc.DLL" at address 0x00007FFA45190000. Successfully hooked module.
Loaded "c:windowssystem32OLEAUT32.DLL" at address 0x00007FFA839F0000. Successfully hooked module.
Loaded "c:windowssystem32MSVCP_WIN.DLL" at address 0x00007FFA83010000. Successfully hooked module.
Loaded "c:windowssystem32OLE32.DLL" at address 0x00007FFA83750000. Successfully hooked module.
Loaded "d:myprojectx64debugdef.DLL" at address 0x00007FFA67FD0000. Successfully hooked module.
Loaded "d:myprojectx64debugTBB_DEBUG.DLL" at address 0x00007FFA62BE0000. Successfully hooked module.
Unloaded "d:myprojectx64debugabc.DLL" at address 0x00007FFA45190000.
Unloaded "d:myprojectx64debugTBB_DEBUG.DLL" at address 0x00007FFA62BE0000.
Unloaded "c:windowssystem32MSVCP_WIN.DLL" at address 0x00007FFA83010000.
Unloaded "c:windowssystem32OLEAUT32.DLL" at address 0x00007FFA839F0000.
Unloaded "c:windowssystem32OLE32.DLL" at address 0x00007FFA83750000.
Unloaded "d:myprojectx64debugdef.DLL" at address 0x00007FFA67FD0000.
Unloaded "d:myprojectx64debugmy.DLL" at address 0x00007FFA49D40000.
LoadLibraryA("my.dll") returned NULL. Error: This operation is only valid in the context of an app container (4250).
检查程序是否从您认为的位置运行(如果您的程序不更改当前目录本身,则项目设置的调试部分的工作目录)。
相关文章:
- 试图在visual studio上用C++创建一个桌面应用程序
- FFmpeg:制作一个应用程序比直接使用ffmepg更好吗
- 在C应用程序中运行C++(带有STL)函数
- 使用VerQueryValue检索应用程序的文件描述
- Qt C++静态thread_local QNetworkAccessManager是线程应用程序的好选择吗
- 使用调试/崩溃报告将应用程序部署到客户端
- C++控制台应用程序阻止退出
- 码头化的C++应用程序是否向后兼容早期的内核版本
- 将应用程序从32位移植到64位时出现问题
- 如何改变c++应用程序的视觉效果
- WM_CTLCOLORSTATIC从未在WIN32应用程序中触发
- PC中的程序和PHONE中的本机描述应用程序之间的数据连接
- 应用程序崩溃并显示"symbol _ZdlPvm, version Qt_5 not defined in file libQt5Core.so.5 with link time reference"
- 在 Win32 应用程序中承载 GTK+3 上下文
- 当删除上下文属性中的QLIST对象时,QT QML应用程序崩溃
- 如何为 QtQuick 应用程序选择 OpenGL 上下文
- 如何修复C#应用程序中调用C++DLL函数时的上下文加载错误
- 有人知道上下文切换吗?通过FSYNC和syslog ng从应用程序到磁盘的日志记录
- 在框架中使用OpenGL上下文编写简单的wxWidgets应用程序
- CUDA5.0上下文管理,在多GPU环境中使用单个应用程序线程