惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
Hacker News: Ask HN
Hacker News: Ask HN
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
WordPress大学
WordPress大学
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
N
Netflix TechBlog - Medium
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 聂微东
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 叶小钗
Cisco Talos Blog
Cisco Talos Blog
S
Schneier on Security
T
Threat Research - Cisco Blogs
腾讯CDC
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Hacker News
The Hacker News
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
N
News | PayPal Newsroom
L
LINUX DO - 最新话题
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Palo Alto Networks Blog
T
Tenable Blog
S
Secure Thoughts
T
Threatpost
V2EX - 技术
V2EX - 技术
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
罗磊的独立博客
P
Privacy & Cybersecurity Law Blog
Engineering at Meta
Engineering at Meta
小众软件
小众软件
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
Y
Y Combinator Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
P
Privacy International News Feed
H
Heimdal Security Blog
量子位
B
Blog

博客园 - Zealic

Windows 下使用 Nginx+Mono 部署 ASP.Net 一种版本化的数据库脚本管理机制 Visual Studio 使用的 ProjectTypeGuids MSBuild 简解 CCNet 的 Build 流程 发散性碎片(2008-12-29) Google Toolbar 5 简析 Google Gadget 的数据丢失原因 乱弹用户资源 职业·病 SVN 简单备份与还原 发散性碎片(2008-11-14) SilverLight 与移动平台 Linux 下的 Apache + FastCGI 部署 ROR 应用 Live Writer 12.0.1370.325 + SyntaxColor4Writer 0.27 ICE 编译器环境集合 Subversion and .Net Windows 下的 Apache + FastCGI 部署 ROR 应用 好用的 Abyss Web Server
动态链接库重定向技术
Zealic · 2008-06-16 · via 博客园 - Zealic

  Windows 有一种方法可以缓解传说种的 DLL Hell,即动态链接库重定向技术。

  这种简单技术的实现方法如下:

场景:

  应用程序 a.exe 依赖动态链接库 compoent.dll 1.0 版本。但是用户的另一个软件 b 在系统的系统目录安装了 component.dll 2.0 版本,这两个版本完全不兼容,

  因此,Windows 在加载 component.dll 的时候,会直接加载系统目录中的 component.dll,这就造成了 a.exe 程序无法运行,如果这时用户需要同时使用两个软件,就会造成所谓的 DLL Hell。

使用动态链接库重定向技术解决 DLL Hell :

  这里有两种方法可以实现动态链接库重定向技术。

  1.创建 a.exe.local 文件,该文件内容为空。

    这时系统就会强制使 a.exe LoadLibrary 时先在 a.exe 所在的目录下查找要加载的动态库,之后才到系统目录下寻找。这个解决方法适用于两个不同的应用。

  2.创建 a.exe.local 目录,将 a.exe 依赖的库放入其中。

    这时系统就会强制使 a.exe LoadLibrary 时先在 a.exe.local 目录下查找要加载的动态库,之后才到系统目录下寻找。这个解决方法适用于单个应用中存在两个应用程序,并且以来同名但是互不兼容的库。

动态链接库重定向技术实际上是 M$ 修改了 LoadLibrary(Ex) 的代码,使其在调用时先检测是否存在 <AppName>.local 文件或目录实现重定向的。它是作为临时解决 DLL HELL 的方法。并且,当应用程序存在 Manifest 时,该技术将不会起作用。

参考 : http://msdn.microsoft.com/en-us/library/ms682600(VS.85).aspx

2008-6-15 Zealic