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

woaidongmao

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

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 肥仔 閱讀(462) 評論(0)  編輯 收藏 引用 所屬分類: Windows開發

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            欧美午夜美女看片| 欧美在线免费观看视频| 一区二区三区高清不卡| 狠狠色2019综合网| 国模吧视频一区| 好吊色欧美一区二区三区四区| 欧美日韩免费高清| 欧美三级视频在线播放| 国产精品v欧美精品v日韩 | 小黄鸭视频精品导航| 亚洲欧美精品中文字幕在线| 校园春色综合网| 久久久噜久噜久久综合| 免费视频亚洲| 亚洲精品国产精品国自产观看浪潮| 亚洲欧美乱综合| 久久人人爽人人| 亚洲精品国产精品国自产观看浪潮| 国产精品99久久久久久有的能看| 亚洲欧洲日本一区二区三区| 欧美区亚洲区| 国产区亚洲区欧美区| 亚洲高清久久| 亚洲欧美日韩精品久久久| 久久综合网hezyo| 亚洲精品你懂的| 亚洲一区二区黄| 久久综合久久久久88| 欧美日韩久久| 精品成人一区二区三区四区| 亚洲性视频网站| 欧美aⅴ一区二区三区视频| 夜夜爽av福利精品导航| 久久精品一二三区| 国产精品v欧美精品v日本精品动漫| 伊人精品成人久久综合软件| 亚洲一区二区三区在线播放| 蜜臀av在线播放一区二区三区| 亚洲美女视频网| 久久久久欧美精品| 国产精品夜夜夜| 亚洲色图综合久久| 欧美mv日韩mv国产网站app| 午夜精品美女久久久久av福利| 欧美日本一区二区三区| 亚洲承认在线| 久久久综合香蕉尹人综合网| aa国产精品| 欧美日韩国产不卡| 亚洲美女中出| 亚洲国产影院| 欧美成人国产va精品日本一级| 狠狠久久综合婷婷不卡| 久久精品国产亚洲高清剧情介绍| 一区二区三区久久精品| 欧美第十八页| 在线日本高清免费不卡| 久久久久久色| 欧美亚洲免费| 国产一区二区丝袜高跟鞋图片 | 亚洲一级黄色| 欧美裸体一区二区三区| 久久米奇亚洲| 亚洲免费在线看| 亚洲国内自拍| 噜噜爱69成人精品| 又紧又大又爽精品一区二区| 久久精品一区| 久久国产精品久久久久久久久久 | 美女视频黄 久久| 久久精品官网| 亚洲精品黄色| 欧美另类人妖| 欧美精品在线观看播放| 美女91精品| 亚洲国产精品高清久久久| 免费高清在线视频一区·| 久久精品国产一区二区电影| 激情久久一区| 欧美激情精品久久久六区热门| 久久人人97超碰精品888| 亚洲成色777777在线观看影院| 欧美1区2区| 欧美日韩视频在线一区二区观看视频 | 国产一区二区精品久久91| 欧美一区二区网站| 久久激情视频| 亚洲精品视频在线看| 亚洲日本aⅴ片在线观看香蕉| 欧美日韩国产一区| 久久精品欧美| 免费永久网站黄欧美| 99re成人精品视频| 亚洲一区二区三区三| 一区二区三区在线不卡| 亚洲欧洲在线一区| 国产日韩精品在线观看| 欧美激情视频一区二区三区不卡| 欧美日本在线播放| 久久久精品动漫| 欧美激情综合五月色丁香| 小处雏高清一区二区三区| 久久深夜福利免费观看| 亚洲一级网站| 免费精品视频| 久久精品综合| 欧美午夜大胆人体| 麻豆精品视频| 国产精品国产精品| 欧美不卡在线| 国产精品一区二区女厕厕| 亚洲国产经典视频| 国产一区二区三区奇米久涩| 日韩一级片网址| 亚洲国产中文字幕在线观看| 香蕉乱码成人久久天堂爱免费 | 亚洲一区999| 久久综合图片| 欧美一区二区福利在线| 你懂的一区二区| 久久蜜桃香蕉精品一区二区三区| 欧美日韩中字| 亚洲欧洲另类国产综合| 亚洲国产第一| 久久精品水蜜桃av综合天堂| 午夜视频一区二区| 欧美成人自拍| 欧美日韩在线视频一区| 久久久成人精品| 国产精品欧美日韩| 在线视频亚洲一区| 一区二区三区国产在线| 欧美电影美腿模特1979在线看| 老司机67194精品线观看| 国产日韩欧美自拍| 亚洲专区一区| 欧美一区午夜视频在线观看| 国产精品扒开腿做爽爽爽软件| 亚洲人成在线播放| 日韩亚洲欧美成人| 欧美精品 日韩| 亚洲激情网站| 99视频有精品| 欧美日韩国产麻豆| 一区二区三区**美女毛片| 亚洲在线观看免费视频| 国产精品极品美女粉嫩高清在线| 91久久久亚洲精品| 日韩一区二区精品| 欧美日韩午夜在线| 亚洲一区二区三区四区视频| 亚洲影院在线| 国产精品久久久久久一区二区三区| 一区二区三区欧美亚洲| 香蕉成人啪国产精品视频综合网| 国产伦精品免费视频| 久久av资源网站| 欧美国产日韩一区| 夜夜躁日日躁狠狠久久88av| 欧美视频二区| 午夜视频在线观看一区二区| 美女主播精品视频一二三四| 亚洲国产日韩在线一区模特| 欧美激情一区| 亚洲一区久久| 欧美国产一区二区在线观看| 一本色道久久88亚洲综合88| 国产精品美女久久久久av超清| 欧美在线视频播放| 91久久综合| 久久国产手机看片| 亚洲人成网站999久久久综合| 国产精品久久久久久久7电影 | 国产精品每日更新| 久久久久久久久久看片| 亚洲黄色毛片| 久久成人免费网| 亚洲精品日韩在线观看| 国产精品视频999| 欧美jizzhd精品欧美巨大免费| 亚洲网站在线播放| 欧美激情偷拍| 欧美伊人久久久久久久久影院| 亚洲国产成人av在线| 国产精品人人做人人爽| 美女亚洲精品| 亚洲欧美在线x视频| 亚洲全部视频| 免费一级欧美在线大片| 亚洲天堂av综合网| 亚洲国语精品自产拍在线观看| 国产美女精品免费电影| 欧美搞黄网站| 久久久久久久久综合| 亚洲欧美日韩在线播放| 欧美一区二区在线视频| 国产日韩精品一区二区三区 | 久久精品最新地址| 中文欧美在线视频| 亚洲第一区在线|