调用函数在c ++ dll没有标题 [英] Call function in c++ dll without header

查看:118
本文介绍了调用函数在c ++ dll没有标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从dll调用一个方法,但是我没有这个源头不是头文件。我试图使用dumpbin / exports查看方法的名称,但是我可以找到方法签名?



有没有办法调用这个方法? p>

谢谢,

解决方案

可以找出一个C函数签名通过分析其拆卸的初始化。函数参数将在堆栈中,函数将以相反的顺序执行一些弹出来读取它们。您将找不到参数名称,但您应该能够找到它们的数字和类型。事情可能会变得更加困难与返回值 - 它可能是通过'eax'寄存器或通过一个特殊的指针传递给函数作为最后一个伪参数(在堆栈的顶部)。


I would like to call a method from an dll, but i don't have the source neither the header file. I tried to use the dumpbin /exports to see the name of the method, but i can found the methods signature?

Is there any way to call this method?

Thanks,

解决方案

It is possible to figure out a C function signature by analysing beginnig of its disassembly. The function arguments will be on the stack and the function will do some "pops" to read them in reverse order. You will not find the argument names, but you should be able to find out their number and the types. Things may get more difficult with return value - it may be via 'eax' register or via a special pointer passed to the function as the last pseudo-argument (on the top of the stack).

这篇关于调用函数在c ++ dll没有标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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