使用 AddDllDirectory 删除已添加到进程 DLL 搜索路径的目录。
Syntax
BOOL RemoveDllDirectory(
[in] DLL_DIRECTORY_COOKIE Cookie
);
参数
[in] Cookie
将目录添加到搜索路径时 ,AddDllDirectory 返回的 Cookie。
返回值
如果函数成功,则返回值为非零。
如果函数失败,则返回值为零。 若要获取扩展的错误信息,请调用 GetLastError。
注解
RemoveDllDirectory 返回后,Cookie 不再有效,不应使用。
Windows 7、Windows Server 2008 R2、Windows Vista 和 Windows Server 2008: 若要在应用程序中调用此函数,请使用 GetProcAddress 函数从 Kernel32.dll检索其地址。 必须在 目标平台上安装KB2533623。
要求
| Requirement | 价值 |
|---|---|
| 最低支持的客户端 | Windows 8 [仅限桌面应用],在 Windows 7、Windows Server 2008 R2、Windows Vista 和 Windows Server 2008 上KB2533623 |
| 支持的最低服务器 | Windows Server 2012 [仅限桌面应用] |
| 目标平台 | Windows操作系统 |
| Header | libloaderapi.h (包括 Windows.h) |
| Library | kernel32。自由 |
| DLL | Kernel32.dll |