"指定的程序找不到"错误在Windows XP上运行的应用程序时(例外c0000139) [英] "The specified procedure could not be found" error when running app on Windows XP (exception c0000139)

查看:593
本文介绍了"指定的程序找不到"错误在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

我相信例外 c0000139 是未找到入口点。

我们已经采取谨慎,以确保不会有上后XP的API任何直接依赖关系(也有少数,但这些动态加载调用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:


  • Visual Studio的运行时安装

  • 从工作的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.

我的问题是,我是用RegGetValue这是只有在Vista +可用。不幸的是有没有合适的错误报告,如果您使用的是Vista的仅适用于Windows XP 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天全站免登陆