aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpqdll.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq/libpqdll.c')
-rw-r--r--src/interfaces/libpq/libpqdll.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/interfaces/libpq/libpqdll.c b/src/interfaces/libpq/libpqdll.c
index f0241acf786..1e7d6479378 100644
--- a/src/interfaces/libpq/libpqdll.c
+++ b/src/interfaces/libpq/libpqdll.c
@@ -1,6 +1,7 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock.h>
+#include "win32.h"
BOOL WINAPI
DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
@@ -20,8 +21,13 @@ 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;
}