RemoveDllDirectory function

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 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft