到搜索DLL的路径中插入一个路径(SetDllDirectory)
来源:互联网 发布:java看哪本书 编辑:程序博客网 时间:2024/06/05 05:28
Adds a directory to the search path used to locate DLLs for the application.
Syntax
BOOL WINAPI SetDllDirectory( _In_opt_ LPCTSTR lpPathName);
Parameters
- lpPathName [in, optional]
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, callGetLastError.
Remarks
The SetDllDirectory function affects all subsequent calls to theLoadLibrary and LoadLibraryEx functions. It also effectively disables safe DLL search mode while the specified directory is in the search path.
After calling SetDllDirectory, the standard 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.
Each time the SetDllDirectory function is called, it replaces the directory specified in the previousSetDllDirectory call. To specify more than one directory, use theAddDllDirectory function and call LoadLibraryEx with LOAD_LIBRARY_SEARCH_USER_DIRS.
To revert to the standard search path used by LoadLibrary and LoadLibraryEx, call SetDllDirectory with NULL. This also restores safe DLL search mode based on theSafeDllSearchMode registry value.
To compile an application that uses this function, define _WIN32_WINNT as 0x0502 or later. For more information, seeUsing the Windows Headers.
Requirements
Minimum supported client
Minimum supported server
Header
- Winbase.h (include Windows.h)
Library
- Kernel32.lib
DLL
- Kernel32.dll
Unicode and ANSI names
- 到搜索DLL的路径中插入一个路径(SetDllDirectory)
- SetDllDirectory设定DLL加载路径
- dll的搜索路径
- 关于DLL搜索路径顺序的一个问题
- 关于DLL搜索路径顺序的一个问题
- 关于DLL搜索路径顺序的一个问题
- 关于DLL搜索路径顺序的一个问题
- DLL搜索路径
- dll搜索路径
- dll搜索路径
- dll 搜索路径
- Windows 用来定位 DLL 的搜索路径
- Windows 用来定位 DLL 的搜索路径
- Windows 用来定位 DLL 的搜索路径
- Windows 用来定位 DLL 的搜索路径
- 关于DLL搜索路径的顺序问题
- 关于DLL搜索路径的顺序问题
- 关于DLL搜索路径的顺序问题
- Ajax核心XMLHttpRequest对象
- const、volatile、mutable的用法
- UIPopoverController使用详解
- Goldengate抽取ORACLE 数据 到 Hbase
- python数据类型详解(自己需要的时候看看)
- 到搜索DLL的路径中插入一个路径(SetDllDirectory)
- ios %.2f是四舍五入吗?你真的了解ios四舍五入的规则吗?
- Linux RHEL5.5进入救援模式重新安装glibc
- 头部渐变的表格视图设计
- 操作系统学习之访问控制
- 关于乐视
- 第十五周 OJ 字符串逆序输出
- 文章标题
- Linux命令--chpasswd