Packing DLLs in your EXE | Dr Dobb's
更多
更多>>
收藏人:quasiceo
北京房价暴涨 途牛网旅游团购
瘦脸针对比图 电子信箱注册
交通事故律师费 南京招聘 瘦脸术
最新文章
每日涨停板复盘 隔日打板法成功率仍...
从PHP源代码中提取出来的md5
objective c MD5 differs from PHP md...
与php md5算法完全一致的C语言版
php md5下16位和32位的实现代码
PHP md5 和 java 的md5出来的数据不一...
感谢您的反馈。
撤销 了解详情
热门文章
图文:重新认识你自己的经典测试
什么是爱?爱一个人是什么感觉?
最全穴位图,找穴不困难!
把扫描好的证件打印出与实际大小相同
知道电脑键盘上的这些秘密,瞬间觉得...
卫生间装修拒绝遗憾 打造完美卫浴空间
凉粉/凉皮/凉面喷香做法·美食家说:...
仅用一分钱成本就能去除脸上顽固的痘疤
搞笑图文131019
【再苦再累再痛再难熬,只有也只能自...
没有告密者的世界是荒寂的
血色黄昏(全本) 知青文学里程碑式的...
感谢您的反馈。
撤销 了解详情
Packing DLLs in your EXE
By Thiadmer Riemersma, June 01, 2002
Post a Comment
DLLpack is a tool that allows DLLs to be embedded inside an executable and extracted the
first time a function from the DLL is called.
DLLpack is a function library that allows DLLs to be embedded inside an executable. The
embedded DLLs get extracted out of the application the first time a function from the DLL is
called. DLLpack exploits the DLL “delay-load” feature of Microsoft Visual C/C++ 6.0 and
Borland C++ Builder 5.0. DLLpack solves two of the most severe problems that the industry
has with DLLs: installation problems (missing DLLs) and version problems.
Why DLLs?
There are a few advantages of DLLs over static linked libraries. Apart from the minor
advantages of reduced disk usage when installing multiple applications that share a single
DLL and a reduced overall memory load when such applications run concurrently, an asset
of a DLL is that it forms a self-contained package with a standardized interface.
Self-contained in the sense that including a DLL into a project infers no more than adding
the appropriate import library to the project files; the DLL is immune to the compiler brand
and the compiler settings that are used to build the project. In contrast, you cannot expect a
static library that you built with one compiler to be useable with another compiler; worse, it
might not work with another version of the same compiler. A static library may also be
sensitive to compiler and linker settings, for example a mismatch between the multi-tasking
and the single-tasking versions of the standard library.
As opposed to that of static libraries, the call level interface of a DLL is pretty well defined.
This allows me to create a DLL that is useable not only with multiple C++ compilers, but also
with other languages such as Delphi or Visual Basic. Of course, it is quite possible to write a
DLL that will only work with one particular system, but that is not at issue here. Creating a
DLL that works with most languages/compilers for Microsoft Windows is fairly easy and doing
so with static libraries is impossible.
Another (minor) advantage of DLLs over static libraries is that you can load a DLL on an
as-needed basis and unload it once you are done with it. This functionality can be useful in
situations where a particular routine has significant memory and resource requirements, and
only rarely executes.
Why DLLpack?
DLLs have severe problems too: every separate file in a product is another potential
installation/configuration problem. Foremost amongst the complaints about DLLs are
“missing DLLs” and “version mismatches”. All kinds of files can disappear from a user’s hard
disk, but DLLs are apparently more prone to go missing than other files, possibly because
they are often stored in a shared location; i.e., the Windows “system” directory. Version
problems, where the application needs version X of the DLL, but a later installation of a
completely unrelated program has upgraded (or downgraded!) the DLL to version Y, are, in
casual parlance, categorized under the label “DLL Hell”.
2014-01-13 | 阅:12 | 分享 转:0 | 来源
登录 注册
搜文章 找馆友
首 页 阅览室 馆友 我的图书馆
Packing DLLs in your EXE | Dr Dobb's http://www.360doc.com/content/14/0113/06/9200790_3447535...
第1页 共5页 2015/6/29 14:43