1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Create, and use for all loads of system DLLs, a wrapper function

called load_system32_dll() which constructs a full pathname for the
DLL using GetSystemDirectory.

The only DLL load not covered by this change is the one for
gssapi32.dll, because that one's not in the system32 directory.

[originally from svn r8993]
This commit is contained in:
Simon Tatham
2010-09-13 08:29:45 +00:00
parent 75f1d3ed94
commit 9f274bed91
8 changed files with 37 additions and 9 deletions

View File

@ -227,9 +227,9 @@ void sk_init(void)
#ifndef NO_IPV6
winsock2_module =
#endif
winsock_module = LoadLibrary("WS2_32.DLL");
winsock_module = load_system32_dll("ws2_32.dll");
if (!winsock_module) {
winsock_module = LoadLibrary("WSOCK32.DLL");
winsock_module = load_system32_dll("wsock32.dll");
}
if (!winsock_module)
fatalbox("Unable to load any WinSock library");
@ -246,7 +246,7 @@ void sk_init(void)
GET_WINDOWS_FUNCTION(winsock_module, gai_strerror);
} else {
/* Fall back to wship6.dll for Windows 2000 */
wship6_module = LoadLibrary("wship6.dll");
wship6_module = load_system32_dll("wship6.dll");
if (wship6_module) {
#ifdef NET_SETUP_DIAGNOSTICS
logevent(NULL, "WSH IPv6 support detected");