如何找出DLL文件的API函数? [英] How to find out API functions of DLL files?

查看:59
本文介绍了如何找出DLL文件的API函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从 DLL 文件中获取所有API(导出)函数?

Is there a way to get all the API (Export) functions from a DLL file?

我知道诸如 Depends 和 PE Explorer 之类的程序可以做到这一点,但它们都没有检索参数列表.

I know that programs such as Depends and PE Explorer can do that but none of them retrieve the argument list.

推荐答案

除非导出的函数类似于 COM DLL 或带有 munging 的 C++,否则这些信息根本无法提供参数.通常可以找到参数的总大小,并且很有可能除以 4 得出接近正确的数字,但除此之外,还需要手工劳动,阅读汇编代码以了解参数是如何产生的用过.

Unless the exported functions are something like a COM DLL or C++ with munging, the information simply isn't there to provide the arguments. It's normally possible to find the total size of the arguments, and there's a pretty decent chance that dividing by 4 will give something close to the right number, but beyond that it's down to manual labor, reading the assembly code to figure out how arguments are used.

如果它是一个 COM DLL,它可能包含一个类型库,它告诉所有关于 DLL 的内容以及如何使用它.在这种情况下,通常只有非常几个导出函数需要查看——您必须使用 COM 来获得真正的功能.

If it's a COM DLL, it may include a type library that tells all about the contents of the DLL and how to use it. In this case, there will typically be only a very few exported functions to look at though -- you'll have to use COM to get at the real functionality.

如果它们是经过修改的 C++ 名称,那么它将取决于用于创建 DLL 的编译器/工具集.例如,如果它是用 VC++ 创建的,则可以使用 UnDecorateSymbolName() 获取全名和参数.

If they're munged C++ names, then it'll depend on the compiler/toolset used to create the DLL. For example, if it was created with VC++, you can use UnDecorateSymbolName() to get the full name and arguments.

这篇关于如何找出DLL文件的API函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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