移除使用 AddDllDirectory 新增至進程 DLL 搜尋路徑的目錄。
語法
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 [僅限傳統型應用程式],KB2533623 Windows 7、Windows Server 2008 R2、Windows Vista 和 Windows Server 2008 |
| 支援的最低伺服器 | Windows Server 2012 [僅限傳統型應用程式] |
| 目標平臺 | 窗戶 |
| Header | libloaderapi.h (包括 Windows.h) |
| Library | 內核32。圖書館 |
| DLL | Kernel32.dll |