]> granicus.if.org Git - postgresql/blob - src/interfaces/libpq/libpqdll.c
Fix typo in comment.
[postgresql] / src / interfaces / libpq / libpqdll.c
1 /* $PostgreSQL: pgsql/src/interfaces/libpq/libpqdll.c,v 1.10 2006/03/11 04:38:40 momjian Exp $ */
2
3 #define WIN32_LEAN_AND_MEAN
4 #include <winsock.h>
5 #include <windows.h>
6 #include "win32.h"
7
8
9 BOOL            WINAPI
10 DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
11                 LPVOID lpReserved)
12 {
13         WSADATA         wsaData;
14
15         switch (fdwReason)
16         {
17                 case DLL_PROCESS_ATTACH:
18                         if (WSAStartup(MAKEWORD(1, 1), &wsaData))
19                         {
20                                 /*
21                                  * No really good way to do error handling here, since we
22                                  * don't know how we were loaded
23                                  */
24                                 return FALSE;
25                         }
26                         break;
27                 case DLL_PROCESS_DETACH:
28                         WSACleanup();
29                         break;
30         }
31
32         return TRUE;
33 }