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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user