Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA10506 for ; Sat, 4 Sep 1999 11:22:48 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA24152; Sat, 4 Sep 1999 11:21:00 -0400 (EDT) To: Magnus Hagander cc: "'David Giffin'" , "Ken J. Wright" , pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] Win32 interface In-reply-to: Your message of Sat, 4 Sep 1999 15:51:55 +0200 <215896B6B5E1CF11BC5600805FFEA82101F7105F@sirius.edu.sollentuna.se> Date: Sat, 04 Sep 1999 11:20:59 -0400 Message-ID: <24150.936458459@sss.pgh.pa.us> From: Tom Lane Magnus Hagander writes: > The problem is that in the DllMain() of the libpq.dll file, WSAStartup() is > called, and that is required before any winsock functions will work. > If you link statically, you have to manually run WSAStartup. > > This should probably be documented :-) Didn't we talk about having fe-connect.c call WSAStartup() (conditionally compiled of course) to avoid this problem? ISTM there was some reason it wouldn't work, like maybe you can only call WSAStartup once per program, but I don't recall for sure. If it *would* work it would probably be a better answer than making users remember to call the thing. regards, tom lane