RemoveDllDirectory 函式 (libloaderapi.h)

使用 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 必須安裝在目標平臺上。

規格需求

需求
最低支援的用戶端 Windows 8 [僅限傳統型應用程式],KB2533623 Windows 7、Windows Server 2008 R2、Windows Vista 和 Windows Server 2008
最低支援的伺服器 Windows Server 2012 [僅限傳統型應用程式]
目標平台 Windows
標頭 libloaderapi.h (包含 Windows.h)
DLL Kernel32.dll