究竟是什么意思ERROR_INVALID_ORDINAL? [英] What exactly means ERROR_INVALID_ORDINAL?

查看:707
本文介绍了究竟是什么意思ERROR_INVALID_ORDINAL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

LoadLibrary函数返回给我错误代码182.从MSDN:



ERROR_INVALID_ORDINAL:操作系统无法运行%1



有没有人对这个错误有更好的描述?

解决方案

非常模糊的错误。然而,术语序数与DLL密切相关。 DLL包含导出函数的列表以及导入函数的列表。其依赖的其他DLL。这些出口和进口通常都有一个名称,但这不是必需的。他们总是有一个数字,数字是序数。



要开始诊断,请使用SDK的Dumpbin.exe工具。执行此操作:

  Dumpbin / exports Blah.dll 

并查看导出列表。你应该看到序数以及名字​​。如果全部检出,运行

  Dumpbin /进口Blah.dll 
pre>

获取依赖关系的列表。奇怪的是,它依赖于另一个DLL中的一个函数,该DLL中的函数不是该DLL没有的。这样的东西。您可以通过使用DependencyWalker工具来减少费力。如果第一步失败,那么在构建DLL时,会发生很大的错误。如果第二步失败,那么你可能会看到某些DLL Hell问题。


The LoadLibrary function is returning to me the error code 182. From MSDN:

ERROR_INVALID_ORDINAL: "The operating system cannot run %1"

Does anyone have a better description of what this error is?

解决方案

Very obscure error. The term "ordinal" is however strongly associated with a DLL. A DLL contains a list of exported functions as well as a list of imported functions. Other DLLs that it has a dependency on. These exports and imports usually have a name, but that's not required. They always have a number, the number is the "ordinal".

To start diagnosing this, use the SDK's Dumpbin.exe tool. Run this first:

Dumpbin /exports Blah.dll

and look at the list of exports. You should see the ordinal as well as the name. If that all checks out, run

Dumpbin /imports Blah.dll

to get a list of the dependencies. Odds are good that it has a dependency on a function in another DLL by number that this DLL doesn't have. Something like that anyway. You can probably make it less laborious by using the DependencyWalker tool. If the first step fails then something went drastically wrong when the DLL was built. If the second step fails then you're probably looking at some kind of DLL Hell problem.

这篇关于究竟是什么意思ERROR_INVALID_ORDINAL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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