我想从 dll 调用方法,但我没有源文件和头文件.我尝试使用dumpbin/exports 查看方法名称,但我可以找到方法签名?
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?
谢谢,
可以通过分析反汇编的开始来找出 C 函数的签名.函数参数将在堆栈中,并且函数将执行一些弹出"操作以相反的顺序读取它们.您不会找到参数名称,但您应该能够找到它们的编号和类型.返回值可能会变得更加困难 - 它可能通过eax"寄存器或通过作为最后一个伪参数传递给函数的特殊指针(在堆栈顶部).
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中调用函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!