DLL简单问题 [英] DLL Simple Question

查看:95
本文介绍了DLL简单问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello VC,


给出来自某个未知地点的非DotNET dll

如何知道其中的类,或者我如何查看类,方法,

属性等..


谢谢

解决方案

< blockquote>" News VS.NET(MS ILM)" <平方********** @ hotmail.com>写在消息

新闻:uC ************** @ TK2MSFTNGP09.phx.gbl ...

给定一个非DotNET来自某个未知地方的dll
我如何知道其中的类,或者如何查看类,方法,
属性等。




简答:你不是。


更长的答案:


你可以检查DLL输出的内容(使用MS工具) )使用此命令


dumpbin / exports randomDLL.dll


它为您提供按名称导出的函数的公共名称。 br />
可以导出无名称的函数。并非需要导出类中的所有成员函数



在许多(所有?)情况下,事实证明C ++成员函数的名称是

由编译器修饰(包含)有关

参数的数量和类型以及返回值的信息。但是,C ++编译器

不要使用相同的装饰方案。所以,如果您知道用于生成目标代码的编译器,您可以收集一些信息,但不是很多。


问候。



感谢Will

我会尝试它


" William DePalo [ [MVP VC ++]" < WI *********** @ mvps.org>在消息中写道

news:%2 **************** @ tk2msftngp13.phx.gbl ...

"新闻VS.NET(MS ILM)" <平方********** @ hotmail.com>在消息中写道
新闻:uC ************** @ TK2MSFTNGP09.phx.gbl ...

给出一些未知的非DotNET dll地方
我如何知道其中的课程,或者我如何查看课程,方法,
属性等。
简答:你不是。
<更长的答案:

您可以使用此命令检查DLL导出的内容(使用MS工具)

dumpbin / exports randomDLL.dll
函数可以在没有名称的情况下导出。并非所有



类中的成员函数都需要导出。

在许多(所有?)情况下,事实证明C ++成员函数的名称是
由编译器修饰(包含)有关参数的数量和类型以及返回值的信息。但是,C ++编译器不会使用相同的装饰方案。所以,如果您知道用于生成目标代码的编译器,您可能会收集一些信息,但不是很多。

问候。



我试过使用dumpbin,我得到以下所有


C:\ Temp> dumpbin / exports" ; C:\Program Files\SOYO\HW Monitor\itevio.dll"

(null):错误:无法执行LINK.EXE


William DePalo [MVP VC ++]" < WI *********** @ mvps.org>在消息中写道

news:%2 **************** @ tk2msftngp13.phx.gbl ...

"新闻VS.NET(MS ILM)" <平方********** @ hotmail.com>在消息中写道
新闻:uC ************** @ TK2MSFTNGP09.phx.gbl ...

给出一些未知的非DotNET dll地方
我如何知道其中的课程,或者我如何查看课程,方法,
属性等。
简答:你不是。
<更长的答案:

您可以使用此命令检查DLL导出的内容(使用MS工具)

dumpbin / exports randomDLL.dll
函数可以在没有名称的情况下导出。并非所有



类中的成员函数都需要导出。

在许多(所有?)情况下,事实证明C ++成员函数的名称是
由编译器修饰(包含)有关参数的数量和类型以及返回值的信息。但是,C ++编译器不会使用相同的装饰方案。所以,如果您知道用于生成目标代码的编译器,您可能会收集一些信息,但不是很多。

问候。



Hello VC,

Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..

Thank you

解决方案

"News VS.NET ( MS ILM )" <sq**********@hotmail.com> wrote in message
news:uC**************@TK2MSFTNGP09.phx.gbl...

Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..



Short answer: you don''t.

Longer answer:

You can inspect what a DLL exports (using the MS tools) with this command

dumpbin/exports randomDLL.dll

That gets you the public name of the functions that are exported by name.
Functions may be exported without names. Not all member functions in classes
need to be exported.

In many (all?) cases, it turns out that C++ member functions have names
which are decorated (mangled) by the compiler to include information about
the number and type of arguments and return value. However, C++ compilers
don''t use the same decoration scheme. So, if you know the compiler used to
generate the object code you may glean some information but not a lot.

Regards.
Will


Thank Will
I will try it

"William DePalo [MVP VC++ ]" <wi***********@mvps.org> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...

"News VS.NET ( MS ILM )" <sq**********@hotmail.com> wrote in message
news:uC**************@TK2MSFTNGP09.phx.gbl...

Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..
Short answer: you don''t.

Longer answer:

You can inspect what a DLL exports (using the MS tools) with this command

dumpbin/exports randomDLL.dll

That gets you the public name of the functions that are exported by name.
Functions may be exported without names. Not all member functions in


classes need to be exported.

In many (all?) cases, it turns out that C++ member functions have names
which are decorated (mangled) by the compiler to include information about
the number and type of arguments and return value. However, C++ compilers
don''t use the same decoration scheme. So, if you know the compiler used to
generate the object code you may glean some information but not a lot.

Regards.
Will



I have tried to use the dumpbin and all I get the following

C:\Temp>dumpbin/exports "C:\Program Files\SOYO\HW Monitor\itevio.dll"
(null) : error : cannot execute LINK.EXE

"William DePalo [MVP VC++ ]" <wi***********@mvps.org> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...

"News VS.NET ( MS ILM )" <sq**********@hotmail.com> wrote in message
news:uC**************@TK2MSFTNGP09.phx.gbl...

Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..
Short answer: you don''t.

Longer answer:

You can inspect what a DLL exports (using the MS tools) with this command

dumpbin/exports randomDLL.dll

That gets you the public name of the functions that are exported by name.
Functions may be exported without names. Not all member functions in


classes need to be exported.

In many (all?) cases, it turns out that C++ member functions have names
which are decorated (mangled) by the compiler to include information about
the number and type of arguments and return value. However, C++ compilers
don''t use the same decoration scheme. So, if you know the compiler used to
generate the object code you may glean some information but not a lot.

Regards.
Will



这篇关于DLL简单问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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