“无法找到指定的程序”在Windows XP上运行应用程序时出错(异常c0000139) [英] "The specified procedure could not be found" error when running app on Windows XP (exception c0000139)

查看:290
本文介绍了“无法找到指定的程序”在Windows XP上运行应用程序时出错(异常c0000139)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个在Vista和Win7上运行正常的DLL一段时间,但是当在XP上运行时,我们收到错误 LoadLibrary()被调用来加载它。

We have a dll that has been running fine on Vista and Win7 for a while, but when running on XP we get the error "The specified procedure could not be found" when LoadLibrary() is called to load it.

我已经尝试通过Dependency Walker运行它,配置文件选项,全局标志设置为显示加载器快照,唯一看起来很有用的信息,我可以得出它是:

I've tried running it through Dependency Walker with the Profile option, with Global Flags set to show loader snaps and the only seemingly useful information I can get out of it is:

LDR: Snapping imports for MyDll.dll from KERNEL32.dll
LDR: LdrGetProcedureAddress by NAME - RtlGetLastWin32Error
LDR: exception c0000139 thrown within function LdrpSnapIAT
Exception record: 0012E490
Context record: 0012E4A4
Context->Eip = 7C9673BE
Context->Ebp = 0012E7C0
Context->Esp = 0012E770
LDR: LdrpSnapIAT - caught exception c0000139 snapping thunks (#2)
LDR: LdrpWalkImportTable - LdrpSnapIAT #2 failed with status c0000139

我相信exce p $ c0000139 是未找到入口点。

I believe that exception c0000139 is 'Entry Point Not Found'.

我们已经注意确保没有任何直接依赖于XP后的API(有一些,但是这些动态加载的是code> LoadLibrary())。 dll是用 WINVER _WIN32_WINNT 设置为 0x0501 。图书馆的入口点在依赖关系监视器中显示的导出中可见,并且没有明显的缺失依赖关系。相同的应用程序在Vista和Win7中运行完全正常。早期版本的dll在XP上工作得很好(由于这个组件的性质,很难看出哪些更改导致了破坏)。

We've taken care to ensure that there aren't any direct dependencies on post-XP APIs (there are a few, but these are dynamically loaded with LoadLibrary()). The dll was built with WINVER and _WIN32_WINNT set to 0x0501. The entry point of the library is visible in the exports shown in Dependency Monitor, and there are no obvious missing dependencies. The same application runs absolutely fine in Vista and Win7. An earlier version of the dll worked fine on XP (due to the nature of this component it's difficult to see which change caused things to break).

编辑:其他的东西我我已经打折了:

other things I think I've discounted:


  • 可视化工作室运行时安装

  • 一个工作的DLL和一个不相同的清单文件

有没有什么其他明显的我缺少?

Is there anything else obvious I'm missing?

推荐答案

我不知道这是否会帮助你,但是我今天遇到了与加载器快照相同的问题。原来,我的问题在depends.exe可见,但我不知道dll是粉红色的意义...我只是诊断出导出问题依赖,而不是导入问题。

I've no idea if this will help you but I had the exact same issue today with loader snaps. It turned out that my problem was visible in depends.exe but I didn't know the significance of dlls being pink... I've only ever diagnosed export issues with depends, not import issues.

我的问题是我使用的只是Vista +上的RegGetValue。不幸的是,如果您在Windows XP上使用仅Vista Vista的API,则没有适当的错误报告。取决于在导入部分中显示的内容,如下所示:

My issue was that I was using "RegGetValue" which is only available on Vista+. Unfortunately there's no proper error reporting if you use a Vista only API on Windows XP. Depends showed this in the import section like so:

我注意到你的问题是与Kernel32.dll而不是Advapi.dll,所以检查导入与依赖...

I notice that your issue was with Kernel32.dll rather than Advapi.dll so check the imports with depends...

这篇关于“无法找到指定的程序”在Windows XP上运行应用程序时出错(异常c0000139)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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