简体   繁体   中英

Unable to find security.dll library on class library application

I trying to use ssl connection on class library application but i tried to authenticate as a client to server i got following error message.

"Unable to find an entry point named 'EnumerateSecurityPackagesW' in DLL 'security.dll'."

Have any body experience about this?

Security.dll is also the same name for the Windows DLL containing the SSPI implementation, which is used for authentication. When loading DLLs, the local bin directory will be checked before the Windows directory. As a result, your System.dll is being loaded instead of the SSPI System.dll.

So if in certain situations your custom Security.dll is loaded before c:\\winnt\\system32\\security.dll then LoadLibrary thinks it has the dll already loaded (since it's just a Win32 Dll, only name matter, NOT version information). But as we know this is not the correct dll and hence the problem.

The workaround is to change the dll name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM