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

推荐订阅源

宝玉的分享
宝玉的分享
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】
T
The Blog of Author Tim Ferriss
N
Netflix TechBlog - Medium
GbyAI
GbyAI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
L
LINUX DO - 热门话题
Security Latest
Security Latest
月光博客
月光博客
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threat Research - Cisco Blogs
The GitHub Blog
The GitHub Blog
Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
罗磊的独立博客
Attack and Defense Labs
Attack and Defense Labs
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
S
Securelist
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
PCI Perspectives
PCI Perspectives
S
Security Affairs
Schneier on Security
Schneier on Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LangChain Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
H
Hacker News: Front Page
C
Cyber Attacks, Cyber Crime and Cyber Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Privacy & Cybersecurity Law Blog
W
WeLiveSecurity
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
K
Kaspersky official blog
Google Online Security Blog
Google Online Security Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
V
Vulnerabilities – Threatpost
Recorded Future
Recorded Future

博客园 - 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