windows中搜索dll的顺序


一般的顺序就是: exe所在目录--> 当前目录 --> windows system 目录 --> windows 目录 --> $PATH变量所规定的路径

具体的描述可以参看这里: windows MSDN

IfSafeDllSearchModeis enabled, the search order is as follows:

  1. The directory from which the application loaded.
  2. The system directory. Use theGetSystemDirectoryfunction 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 theGetWindowsDirectoryfunction 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 theApp Pathsregistry key. TheApp Pathskey is not used when computing the DLL search path.

而linux中的搜索路径一般为: 首先 编译链接中的 -L参数, 然后是检查$LD_LIBRARY 路径, 如果还未发现,就会检查/etc/ld.so.conf当中设定的库的路径,

最后是检查 ---> /lib --> /usr/lib 或者下的默认库;

优质内容筛选与推荐>>
1、2017-2018-2 20155303『网络对抗技术』Final:Web渗透获取WebShell权限
2、5月17日上课笔记-js面向对象
3、Navicat for mysql
4、celery异步任务、定时任务
5、两列自适应布局


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号