c/c++实现将cef的一堆dll单独放在一个文件夹,与程序exe目录区分开
来源:互联网 发布:qq邮箱软件 编辑:程序博客网 时间:2024/05/20 02:28
Adds a directory to the search path used to locate DLLs for the application.
BOOL WINAPI SetDllDirectory(
__in LPCTSTR lpPathName
);
Parameters
lpPathName
The directory to be added to the search path. If this parameter is an empty string (""), the call removes the current directory from the default DLL search order. If this parameter is NULL, the function restores the default search order.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The SetDllDirectory function affects all subsequent calls to the LoadLibrary and LoadLibraryEx functions. It also effectively disables safe DLL search mode while the specified directory is in the search path.
After calling SetDllDirectory, the DLL search path is:
The directory from which the application loaded.
The directory specified by the lpPathName parameter.
The system directory. Use the GetSystemDirectory function to get the path of this directory. The name of this directory is System32.
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.
The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
The directories that are listed in the PATH environment variable.
To revert to the default search path used by LoadLibrary and LoadLibraryEx, call SetDllDirectory with NULL. This also restores safe DLL search mode based on the SafeDllSearchMode registry value.
To compile an application that uses this function, define _WIN32_WINNT as 0x0502 or later. For more information, see Using the Windows Headers.
Requirements
Client
Requires Windows Vista or Windows XP SP1.
Server
Requires Windows Server 2008 or Windows Server 2003.
Header
Declared in Winbase.h; include Windows.h.
Library
Use Kernel32.lib.
DLL
Requires Kernel32.dll.
Unicode
Implemented as SetDllDirectoryW (Unicode) and SetDllDirectoryA (ANSI).
See Also
Dynamic-Link Library Search Order
GetDllDirectory
GetSystemDirectory
GetWindowsDirectory
LoadLibrary
LoadLibraryEx
Send comments about this topic to Microsoft
BOOL WINAPI SetDllDirectory(
__in LPCTSTR lpPathName
);
Parameters
lpPathName
The directory to be added to the search path. If this parameter is an empty string (""), the call removes the current directory from the default DLL search order. If this parameter is NULL, the function restores the default search order.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The SetDllDirectory function affects all subsequent calls to the LoadLibrary and LoadLibraryEx functions. It also effectively disables safe DLL search mode while the specified directory is in the search path.
After calling SetDllDirectory, the DLL search path is:
The directory from which the application loaded.
The directory specified by the lpPathName parameter.
The system directory. Use the GetSystemDirectory function to get the path of this directory. The name of this directory is System32.
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.
The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
The directories that are listed in the PATH environment variable.
To revert to the default search path used by LoadLibrary and LoadLibraryEx, call SetDllDirectory with NULL. This also restores safe DLL search mode based on the SafeDllSearchMode registry value.
To compile an application that uses this function, define _WIN32_WINNT as 0x0502 or later. For more information, see Using the Windows Headers.
Requirements
Client
Requires Windows Vista or Windows XP SP1.
Server
Requires Windows Server 2008 or Windows Server 2003.
Header
Declared in Winbase.h; include Windows.h.
Library
Use Kernel32.lib.
DLL
Requires Kernel32.dll.
Unicode
Implemented as SetDllDirectoryW (Unicode) and SetDllDirectoryA (ANSI).
See Also
Dynamic-Link Library Search Order
GetDllDirectory
GetSystemDirectory
GetWindowsDirectory
LoadLibrary
LoadLibraryEx
Send comments about this topic to Microsoft
阅读全文
0 0
- c/c++实现将cef的一堆dll单独放在一个文件夹,与程序exe目录区分开
- c#程序不必把dll放在exe目录下--app.config文件中添加dll程序集的查找目录
- 【C语言】【unix c】将头文件放在默认的头文件搜索目录里面
- 解决VC中动态加载DLL时,必须将DLL文件放在EXE文件路经和系统目录下的问题
- 看到的帮个忙,把css代码单独放在一个文件夹页面引用
- 一个C 实现的遍历文件夹的程序
- Eclipse启动的时候,需要jre,因此只要将jre放在eclipse.exe即eclipse.ini目录下,即可,但是,文件夹名称一定要是jre,不能重命名
- 将两个两位数的正整数a、b合并形成一个整数放在C中。
- Linux-C基础知识学习:C语言作业-将5个学生成绩保存在一个数组中,单独实现一个计算平均成绩的average函数, 在main函数中获取该函数返回的平均值,并打印。
- vs将dll和exe分开放的方法
- [C]static与单独的{}
- C语言 程序实现将一个数组所有奇数放在前半部分,偶数位于后半部分
- windows C/C++ 在一个程序中打开,关闭和监视其它的exe程序
- 用WinRAR将exe与所依赖的dll与资源打包成一个exe
- c++将一个文件夹下的所有文件读取出来放在一个文件中
- C#把dll放在不同的目录让你的程序更整洁
- C#/ASP.NET/WinForm 通过ICSharpCode.SharpZipLib.dll实现文件夹、文件的压缩与解压
- C++,CLR,C#的DLL和EXE的32位程序,如何在64位系统上使用
- 华风爱科CEO冯雪:看到天气的经济价值 | WISE2017新商业大会
- 这 12 个趋势,将引爆 2018 用户体验设计潮流
- 乂学教育、朋友印象创始人栗浩洋:这轮 AI 风潮中谁会杀死 BAT? | WISE2017新商业大会
- 外媒评2017年科技滑铁卢:亚马逊Key、HomePod、Uber纷纷上榜
- Eclipse+GitHub的安装与使用教程(亲测可用)
- c/c++实现将cef的一堆dll单独放在一个文件夹,与程序exe目录区分开
- php实现简单的基于DFA算法的敏感词过滤
- 既要会买,也要会卖——交易时机的选择
- uboot详解——cpu内部,外部和软件看门狗
- 氪星晚报 | 周鸿祎拿比特币悬赏“幕后指使人”;乐视全面从易到退出;吉利买完沃尔沃买奔驰
- 新风向文娱主题演讲:小众逆袭大众,戏精才会吸金(上) | WISE2017新商业大会
- 富途证券邬必伟:互联网券商有用户,而传统券商只有客户 | WISE2017新商业大会
- 混合高斯模型
- 用例图