This topic has not yet been rated - Rate this topic

RemoveDllDirectory function

Applies to: desktop apps only

Removes a directory that was added to the process DLL search path by using AddDllDirectory.

Syntax

 BOOL  WINAPI RemoveDllDirectory(
  __in  DLL_DIRECTORY_COOKIE Cookie
);

Parameters

Cookie [in]

The cookie returned by AddDllDirectory when the directory was added to the search path.

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

After RemoveDllDirectory returns, the cookie is no longer valid and should not be used.

Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008:  To call this function in an application, use the GetProcAddress function to retrieve its address from Kernel32.dll. KB2533623 must be installed on the target platform.

Requirements

Minimum supported client

Windows 8 Consumer Preview

Minimum supported server

Windows Server 8 Beta

Version

KB2533623 on Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008

Header

LibLoaderAPI.h (include Windows.h);
None on Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008

DLL

Kernel32.dll

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ