青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

woaidongmao

文章均收錄自他人博客,但不喜標題前加-[轉(zhuǎn)貼],因其丑陋,見諒!~
隨筆 - 1469, 文章 - 0, 評論 - 661, 引用 - 0
數(shù)據(jù)加載中……

Dynamic-Link Library Search Order

 

http://msdn.microsoft.com/en-us/library/ms682586(v=vs.85).aspx

 

 

A system can contain multiple versions of the same dynamic-link library (DLL). Applications can control the location from which a DLL is loaded by specifying a full path, using DLL redirection, or by using a manifest. If none of these methods are used, the system searches for the DLL at load time as described in this topic.

If a DLL with dependencies is loaded by specifying a full path, the system searches for the DLL's dependent DLLs as if they were loaded with just their module names.

If a DLL with the same module name is already loaded in memory, the system checks only for redirection and a manifest before resolving to the loaded DLL, no matter which directory it is in. The system does not search for the DLL.

If the DLL is on the list of known DLLs for the version of Windows on which the application is running, the system uses its copy of the known DLL (and the known DLL's dependent DLLs, if any) instead of searching for the DLL. For a list of known DLLs, see the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs.

Standard Search Order

The DLL search order used by the system depends on whether safe DLL search mode is enabled or disabled.

Safe DLL search mode is enabled by default. To disable this feature, create the HKLM\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode registry value and set it to 0. Calling the SetDllDirectory function effectively disables SafeDllSearchMode while the specified directory is in the search path and changes the search order as described in this topic.

Windows XP and Windows 2000 with SP4:  Safe DLL search mode is disabled by default. To enable this feature, create the SafeDllSearchMode registry value and set it to 1. Safe DLL search mode is enabled by default starting with Windows XP with Service Pack 2 (SP2).

Windows 2000:  The SafeDllSearchMode value is not supported. The DLL search order is identical to the search order that occurs when safe DLL search mode is disabled. The SafeDllSearchMode value is supported starting with Windows 2000 with SP4.

If SafeDllSearchMode is enabled, the search order is as follows:

  1. The directory from which the application loaded.
  2. The system directory. Use the GetSystemDirectory function to get the path of this directory.
  3. The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
  4. The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
  5. The current directory.
  6. The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.

If SafeDllSearchMode is disabled, the search order is as follows:

  1. The directory from which the application loaded.
  2. The current directory.
  3. The system directory. Use the GetSystemDirectory function to get the path of this directory.
  4. The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
  5. The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
  6. The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.
Alternate Search Order

The standard search order used by the system can be changed by calling the LoadLibraryEx function with LOAD_WITH_ALTERED_SEARCH_PATH. The standard search order can also be changed by calling the SetDllDirectory function.

Windows XP:  Changing the standard search order by calling SetDllDirectory is not supported until Windows XP with Service Pack 1 (SP1).

Windows 2000:  Changing the standard search order by calling SetDllDirectory is not supported.

If you specify an alternate search strategy, its behavior continues until all associated executable modules have been located. After the system starts processing DLL initialization routines, the system reverts to the standard search strategy.

The LoadLibraryEx function supports an alternate search order if the call specifies LOAD_WITH_ALTERED_SEARCH_PATH and the lpFileName parameter specifies an absolute path.

Note that the standard search strategy and the alternate search strategy specified by LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH differ in just one way: The standard search begins in the calling application's directory, and the alternate search begins in the directory of the executable module that LoadLibraryEx is loading.

If SafeDllSearchMode is enabled, the alternate search order is as follows:

  1. The directory specified by lpFileName.
  2. The system directory. Use the GetSystemDirectory function to get the path of this directory.
  3. The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
  4. The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
  5. The current directory.
  6. The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.

If SafeDllSearchMode is disabled, the alternate search order is as follows:

  1. The directory specified by lpFileName.
  2. The current directory.
  3. The system directory. Use the GetSystemDirectory function to get the path of this directory.
  4. The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
  5. The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
  6. The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.

The SetDllDirectory function supports an alternate search order if the lpPathName parameter specifies a path. The alternate search order is as follows:

  1. The directory from which the application loaded.
  2. The directory specified by lpPathName.
  3. The system directory. Use the GetSystemDirectory function to get the path of this directory. The name of this directory is System32.
  4. The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched. The name of this directory is System.
  5. The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
  6. The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.

If the lpPathName parameter is an empty string, the call removes the current directory from the search order.

SetDllDirectory effectively disables safe DLL search mode while the specified directory is in the search path. To restore safe DLL search mode based on the SafeDllSearchMode registry value and restore the current directory to the search order, call SetDllDirectory with lpPathName as NULL.

Related Topics
Application Registration
Dynamic-Link Library Redirection
LoadLibrary
LoadLibraryEx
SetDllDirectory
Side-by-side Components

Send comments about this topic to Microsoft

Build date: 12/15/2010

Community Content Add

Annotations FAQ

How about the GAC?

From the above article, it does not seems the GAC is even searched. Is the GAC searched? When? $0 $0 $0The GAC is not searched.  Native DLLs should not be placed in the GAC.  Managed assemblies are loaded by .NET and don't use the same search order.  (Ben Voigt, Visual C++ MVP)$0$0$0 $0 $0

posted on 2011-04-27 16:08 肥仔 閱讀(459) 評論(0)  編輯 收藏 引用 所屬分類: Windows開發(fā)

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            开元免费观看欧美电视剧网站| 野花国产精品入口| 亚洲精一区二区三区| 亚洲久久一区二区| 亚洲激情av| 亚洲精品中文字幕女同| 99精品欧美| 午夜精品视频一区| 免费在线成人av| 国产精品啊v在线| 国产日韩欧美黄色| 亚洲激情网站| 午夜亚洲视频| 欧美一级视频一区二区| 老司机午夜免费精品视频| 99re66热这里只有精品3直播| 亚洲日本久久| 亚洲女女做受ⅹxx高潮| 久久综合激情| 国产精品播放| 亚洲欧洲在线播放| 午夜精品久久| 亚洲国产另类久久久精品极度| 99国产精品一区| 久久精品网址| 国产精品久久久久久久久久妞妞 | 亚洲精品三级| 久久精品国产精品亚洲综合| 欧美激情国产日韩精品一区18| 国产精品免费观看在线| 亚洲破处大片| 久久久久9999亚洲精品| 亚洲日本精品国产第一区| 欧美一级片久久久久久久| 欧美高清在线视频| 国产在线视频欧美一区二区三区| 99精品欧美一区二区三区综合在线| 亚洲欧美综合国产精品一区| 亚洲高清精品中出| 久久精品亚洲热| 国产精品成人免费视频| 亚洲韩国日本中文字幕| 久久噜噜噜精品国产亚洲综合| 夜夜嗨av一区二区三区中文字幕 | 国产夜色精品一区二区av| 99精品99| 亚洲狠狠丁香婷婷综合久久久| 亚洲欧美综合v| 国产精品欧美一区喷水| 在线亚洲欧美| 99精品欧美一区二区三区| 欧美国产先锋| 亚洲精品免费在线| 亚洲国产精品视频| 欧美.www| 美女主播视频一区| 尤物视频一区二区| 久久一区二区视频| 久久国产精品久久国产精品| 国产目拍亚洲精品99久久精品| 亚洲女同性videos| 亚洲综合久久久久| 国产欧美日韩中文字幕在线| 午夜精品偷拍| 欧美在线观看网址综合| 激情欧美日韩| 欧美v日韩v国产v| 欧美成人精品不卡视频在线观看 | 久久精品一区二区三区四区| 香蕉尹人综合在线观看| 国模吧视频一区| 久久亚洲精选| 欧美国产亚洲另类动漫| 中文在线一区| 亚洲欧美精品一区| 激情欧美日韩| 亚洲精品一区二区三区婷婷月| 欧美日韩精品免费观看视频| 亚洲综合不卡| 久久久噜噜噜久噜久久| 亚洲精品欧美一区二区三区| 99精品久久久| 国产综合色在线| 亚洲经典三级| 国产欧美69| 亚洲第一级黄色片| 国产精品久久久久久五月尺| 久久精品国产一区二区三区| 久久综合九色综合久99| 国产精品99久久久久久人| 午夜国产精品视频免费体验区| 狠狠入ady亚洲精品经典电影| 亚洲第一主播视频| 国产精品日韩一区二区三区| 欧美91大片| 国产精品美女在线| 亚洲电影视频在线| 国产日韩欧美综合精品| 亚洲狠狠丁香婷婷综合久久久| 国产伦精品一区二区三区视频孕妇 | 香蕉av福利精品导航| 久久久久久久久久久久久9999| 日韩视频免费在线| 久久黄色小说| 亚洲欧美国内爽妇网| 久热精品视频在线观看| 亚洲欧美在线一区二区| 欧美乱妇高清无乱码| 久久亚洲综合| 国产精品一区二区你懂得| 亚洲国产高清一区| 国内精品久久久久国产盗摄免费观看完整版 | 性视频1819p久久| 在线亚洲激情| 免费毛片一区二区三区久久久| 欧美一区在线直播| 欧美特黄a级高清免费大片a级| 欧美黑人一区二区三区| 国产一区视频观看| 午夜在线精品偷拍| 欧美一级在线播放| 欧美色中文字幕| 亚洲久久一区二区| 99视频在线观看一区三区| 欧美www视频| 欧美国产欧美亚洲国产日韩mv天天看完整 | 亚洲在线一区| 日韩一级黄色av| 亚洲日韩视频| 亚洲成色777777在线观看影院| 欧美日韩亚洲一区二区| 欧美激情1区2区3区| 一色屋精品视频免费看| 欧美中文在线字幕| 欧美在线啊v| 国产人妖伪娘一区91| 亚洲女人av| 久久精品国产精品亚洲精品| 国产欧美视频在线观看| 欧美一区二区精品久久911| 欧美在线免费视屏| 国产视频久久久久| 久久高清福利视频| 欧美国产日韩一区二区三区| 亚洲肉体裸体xxxx137| 欧美麻豆久久久久久中文| 日韩一级不卡| 国产一区二区三区四区hd| 国产日韩欧美不卡| 嫩草成人www欧美| 麻豆精品传媒视频| 在线观看欧美黄色| 久久婷婷国产综合国色天香| 久久综合久色欧美综合狠狠| 在线免费观看日本一区| 欧美成人免费播放| 一本色道久久88亚洲综合88| 性欧美精品高清| 精品96久久久久久中文字幕无| 欧美a级理论片| 一区二区三区日韩在线观看| 亚洲桃花岛网站| 国产精品一二一区| 美女啪啪无遮挡免费久久网站| 最新日韩在线| 香蕉久久夜色精品国产使用方法| 国产中文一区二区| 久久久天天操| 国产精品一区二区久久久| 蜜臀av一级做a爰片久久| 日韩视频在线观看| 亚洲综合成人婷婷小说| 久久久久se| 亚洲日本成人网| 国产精品黄页免费高清在线观看| 欧美综合第一页| 夜夜嗨av一区二区三区中文字幕| 久久精品在线视频| 亚洲社区在线观看| 在线欧美日韩| 国产精品h在线观看| 老司机精品久久| 亚洲综合999| 亚洲激情欧美激情| 免费在线观看成人av| 亚洲一区尤物| 亚洲精品日韩欧美| 国产一区二区三区精品久久久| 欧美精品自拍| 久久亚洲春色中文字幕久久久| 亚洲私拍自拍| 亚洲自拍偷拍福利| 亚洲欧洲99久久| 国产精品午夜国产小视频| 毛片精品免费在线观看| 欧美一区二区三区视频在线| 亚洲日产国产精品| 你懂的网址国产 欧美| 欧美日韩精品一二三区| 久久久久这里只有精品|