阅读dll文件内容 [英] Read dll file content

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

问题描述

嗨朋友们,



我需要使用java或C#从dll文件中读取文件内容。我将要包含在我的项目中的dll内容,但我不知道如何阅读它。任何人都可以帮我了解dll文件的文件内容。



任何答案都可以欣赏..



提前感谢..



regars,



Sasi

Hi friends,

I need to read the file contents from the dll file using java or C#. That dll content which i am going to include in my project but i dont know how read it. Any one can help me to know the file content of the dll file.

Any answers could be appreciated..

thanks in advance..

regars,

Sasi

推荐答案

我认为你不明白你在问什么。 DLL是可执行文件格式;这不是您可以以任何明智的方式阅读的数据。好吧,你可以把它看作一大块二进制数据甚至解析内容,但这并不意味着你可以使用它。



但是,一个DLL文件可能或者可能不包含一些你可以提取的资源,如果这就是你所追求的。



此外,本机Windows DLL文件对于两个.NET都是陌生的(说到C#项目)和Java。你只能通过P / Invoke在Java中使用它,在Java中通过JNI使用它。



参见:

http://en.wikipedia.org/wiki/PInvoke [ ^ ],

http: //en.wikipedia.org/wiki/JNI [ ^ ]。



-SA
I don't think you understand what are you asking about. The DLL is in an executable file format; this is not data you could "read" in any sensible way. OK, you can read it as a chunk of binary data and even parse the content, but it does not mean you can use it.

However, a DLL file may or may not contain some resources you could extract if that is what you are after.

Also, the native Windows DLL file is foreign to both .NET (speaking of C# projects) and Java. You can only use it in .NET via P/Invoke and in Java via JNI.

See:
http://en.wikipedia.org/wiki/PInvoke[^],
http://en.wikipedia.org/wiki/JNI[^].

—SA


你为什么不尝试思考



MSDN反思概述 [ ^ ]

C#。网络教程反思 [ ^ ]

reflection-examples [ ^ ]

最后在CP上我们有 .NET程序集查看者 [ ^ ]



希望它有所帮助..
Why don't you try Reflections

MSDN Reflection Overview[^]
C# .Net Tutorial Reflection[^]
reflection-examples[^]
Finally on CP we have A .NET assembly viewer[^]

Hope it helps..


很多都取决于它的类型。如果它是.net,那么只需将其添加到解决方案中就应该使api可见。
A lot depends on the type of dll this is. If it is .net then simply adding it to a solution should make the api visible.


这篇关于阅读dll文件内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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