奇怪的垃圾箱出口表 [英] Strange dumpbin export table

查看:69
本文介绍了奇怪的垃圾箱出口表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在互操作一个c ++ dll,并试图访问它的功能. 下面是dll的dumpbin/exports输出:

Am interoping a c++ dll and am attempting to access it's functions. Below is the dumpbin /exports output from the dll:

Dump of file C:\C#Processes\SummarizerApp\SummarizerApp\lib\summarizer37.dll
File Type: DLL
Section contains the following exports for summarizer37.dll

00000000 characteristics
458962FF time date stamp Wed Dec 20 11:21:19 2006
    0.00 version
       1 ordinal base
       4 number of functions
       4 number of names

ordinal hint RVA      name

      1    0 00002960 ?delete_summarization@inxight@@YAXPAVsummarization_interface@1@@Z
      2    1 00016240 ?delete_summarizer@inxight@@YAXPAVsummarizer_interface@1@@Z
      3    2 000105E0 ?make_summarization@inxight@@YAPAVsummarization_interface@1@AAVsummarizer_interface@1@AAVbyte_stream_interface@1@ABVsummarization_input_options@1@ABVsummarization_sentence_output@1@ABVsummarization_phrase_output@1@PBDI5@Z
      4    3 0001BC40 ?make_summarizer@inxight@@YAPAVsummarizer_interface@1@PBD00@Z

Summary

    4000 .data
    B000 .rdata
    4000 .reloc
   2E000 .text

记下序号3.它包括我需要调用的几种方法,特别是:
make_summarization
summarization_input_options
summarization_sentence_output
summarization_phrase_output

Take note of ordinal #3. It includes several methods I need to call, specifically:
make_summarization
summarization_input_options
summarization_sentence_output
summarization_phrase_output

已经完成了该dll的JNI包装,并且知道上面的函数(都是类构造函数)可以从JNI使用的"extern C"中以无歧义的形式获得. 我可以使用dllimport的调用约定属性来未经修饰地访问它们吗?

Have done a JNI wrap of this dll and know that the functions above (which are all class contructors) are available from "extern C" which JNI uses, in unmangled form. Can I use the calling convention property of dllimport to access them undecorated?

在C ++世界中,如果在同一序数下导出多个函数,这是什么意思?访问它们的方法是什么? 谢谢, 吉姆

In the C++ world what does it mean when multiple functions are exported under the same ordinal and what is the method of accessing them? Thanks, Jim

推荐答案

按序导入功能(以#开头序数).
它也可以用于通过错误的名称导入功能. br> 如果您确实对C ++库提供的所有功能都有纯外部C"包装器,那么这很容易.
如果不这样做,则可以构造C ++/CLI包装器以在托管和非托管之间架起桥梁.

The EntryPoint field of the DllImport attribute can be used to import functions by ordinal (prefix the ordinal with a #).
It can also be used to import functions by their mangled name.
If you really have pure "extern C" wrappers for all of the functionality exposed by the C++ library, that makes this easy.
If you do not, you can construct C++/CLI wrappers to bridge between managed and unmanaged.

vc\bin文件夹中的

undname.exe 可以用于拆解已编译的C ++名称:

undname.exe in the vc\bin folder can be used to demangle compiled C++ names:

class inxight::summarization_interface * __cdecl inxight::make_summarization(
   class inxight::summarizer_interface &,
   class inxight::byte_stream_interface &,
   class inxight::summarization_input_options const &,
   class inxight::summarization_sentence_output const &, 
   class inxight::summarization_phrase_output const &,
   char const *, unsigned int , char const *)

这篇关于奇怪的垃圾箱出口表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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