我找到了一个用C++创建的.dll文件。我想打开这个文件并查看类内部的函数。
我该如何打开此文件并在我的C++项目中调用其中的函数?
dumpbin
,您可以显示DLL导入或导出的内容:dumpbin /exports Test0221-5.dll
Dump of file Test0221-5.dll
File Type: DLL
Section contains the following exports for Test0221-5.dll
00000000 characteristics
555E19D5 time date stamp Thu May 21 19:45:57 2015
0.00 version
1 ordinal base
4 number of functions
4 number of names
ordinal hint RVA name
1 0 000113E3 ??0Btest@@QAE@XZ = @ILT+990(??0Btest@@QAE@XZ)
2 1 000112CB ??1Btest@@QAE@XZ = @ILT+710(??1Btest@@QAE@XZ)
3 2 00011028 ?MemberFunc@A@@UAEXXZ = @ILT+35(?MemberFunc@A@@UAEXXZ)
4 3 00011244 createInstance = @ILT+575(_createInstance)
Summary
1000 .data
1000 .idata
3000 .rdata
1000 .reloc
1000 .rsrc
C000 .text
10000 .textbss
createInstance()
的extern "C"
函数。但是你无法进一步了解其参数或返回类型。?
、@
和其他奇怪字符。这些是C++名称的“mangled”。名称的混合取决于编译器。undname
:undname ??0Btest@@QAE@XZ
Undecoration of :- "??0Btest@@QAE@XZ"
is :- "public: __thiscall Btest::Btest(void)"
public: __thiscall Btest::Btest(void) = @ILT 990(public: __thiscall Btest::Btest(void)
public: __thiscall Btest::~Btest(void) = @ILT 710(public: __thiscall Btest::~Btest(void)
public: virtual void __thiscall A::MemberFunc(void) = @ILT 35(public: virtual void __thiscall A::MemberFunc(void)