Advantages and disadvantages of dynamic link libraries-Alibaba Cloud

Introduced:
DLL is a dynamic link library file, also known as an "application extension", which is a software file type. In Windows, many applications are not a complete executable, and they are split into relatively independent, dynamic-link libraries, DLL files, placed in the system. When we execute a program, the corresponding DLL file is called. An application can use multiple DLL files, and a DLL file may also be used by different applications, such that DLL files are called shared DLL files. 

Significance:
DLL files are stored in a variety of program functions (sub-procedures) implementation process, when the program needs to call the function to load the DLL, and then get the address of the function, and finally make the call. The advantage of using DLL files is that the program does not need to load all the code at the beginning of the run, but only when a function is needed by the program to remove it from the DLL. In addition, using DLL files can also reduce the volume of your program.

Advantages:

(1) Save more memory and reduce page switching;

(2) DLL file and EXE file independent, as long as the output interface is unchanged (that is, the name, parameters, return value type and calling convention unchanged), the replacement DLL file will not have any impact on the EXE file, thus greatly improving the maintainability and extensibility;

(3) programs written in different programming languages can call the same DLL function just according to the function calling convention;

(4) Suitable for large-scale software development, make the development process independent, the coupling degree is small, facilitates the development and the test between different developer and the development organization.

(5) Save disk space: When an application uses dynamic linking, multiple applications can share a single copy of the DLL on disk. In contrast, when an application uses a static-link library, each application links the library code to the executable image as a separate copy.

Disadvantages:

An application that uses a dynamic-link library is not self-contained, and it relies on a DLL module to exist, and if you use dynamic linking at load time, the program starts to discover that the DLL does not exist, and the system terminates the program and gives an error message. While using runtime dynamic linking, the system does not terminate, but because the exported function in the DLL is not available, the program fails to load, and the speed is slower than the static link. When a module is updated, if the new module is incompatible with the old module, then the software that needs the module to run will die.

My QR code is as follows, welcome to exchange discussion You are welcome to pay attention to the "It question summary" subscription number. Every day to push the classic face test and interview tips, are dry! The QR code of the subscription number is as follows:

Reference:

Http://baike.baidu.com/view/230750.htm
http://blog.csdn.net/left_la/article/details/12098545
Http://book.51cto.com/art/201008/216649.htm

Related Article:Methods for generating various waveform files Vcd,vpd,shm,fsdb

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值