1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +03:00

Load netmsg.dll locally in winsock_strerror, to avoid actual and

potential problems discussed in pgsql-interfaces.
This commit is contained in:
Tom Lane
2001-11-28 19:40:29 +00:00
parent 9d596e0e3e
commit 3312b8ed3c
3 changed files with 42 additions and 29 deletions

View File

@@ -1,8 +1,8 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock.h>
#include "win32.h"
BOOL WINAPI
DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
LPVOID lpReserved)
@@ -20,12 +20,8 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
*/
return FALSE;
}
if (netmsgModule == NULL)
netmsgModule = LoadLibraryEx("netmsg.dll", NULL, LOAD_LIBRARY_AS_DATAFILE);
break;
case DLL_PROCESS_DETACH:
if (netmsgModule != NULL)
FreeLibrary(netmsgModule);
WSACleanup();
break;
}