VB中DLL文件的用途是什么 [英] What is the Use of DLL files in VB

查看:159
本文介绍了VB中DLL文件的用途是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的兄弟.

我正在使用Windows应用程序,这是一种薪资系统.我已经看到许多Windows应用程序,它们不仅包含一个EXE,而且还包含DLL文件.
因此,当我们可以在EXE中执行所有操作时,我无法理解DLL文件是什么以及为什么要使用它们.

如果DLL文件非常重要,那么为什么我的项目中没有任何DLL的需求.

我的意思是,我们应该在哪里使用DLL文件,以及在DLL文件中写入的内容以及DLL文件的好处是什么.

Dear Brothers.

I am working on a Windows Application, which is a type of Payroll system. I have seen many windows applications which does not consist only one EXE but they have also DLL Files.
So, I am unable to understand that what are the DLL Files and Why are they being used while we can do every thing in our EXE.

If DLL Files are so important then why I have not felt any need of any DLL in my project.

I mean, that where we Should Use DLL files and what is written in a DLL file and what are the benefits of DLL Files.

Can some one please explain?

推荐答案

实际上,您确实使用了DLL ...只是不知道.每当您引用某个.Net类(例如System.Text.StringBuilder)时,您都在使用DLL.但是,您的EXE是基于以下假设而构建的:这些.Net DLL将在您的EXE部署到的计算机上,因此在编译时它们不会放置在bin文件夹中.

您也可以通过引用第三方DLL来使用它们.这些在编译时将包含在bin文件夹中.您甚至可以创建自己的DLL ...您只需创建一个类库即可.然后其他人可以引用该DLL并利用其中的类.
In fact, you do use DLL''s... you just don''t know it. Any time you make a reference to some .Net class (e.g., System.Text.StringBuilder), you are making use of a DLL. However, your EXE is built with the assumption that these .Net DLL''s will be on the computer that your EXE gets deployed to, so they are not placed in the bin folder when you compile.

You can also make use of third party libraries by referencing their DLL. Those would be included in the bin folder when you compile. You can even make your own DLL''s... you just create a class library. Others can then reference that DLL and make use of the classes inside it.


这篇关于VB中DLL文件的用途是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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