Subject Re: [ib-support] Slow (> 20 sec) connection on Windows XP
Author Claudio Valderrama C.
""Olivier Mascia"" <om@...> wrote in message
> I have 2 Windows XP (retail version build 2600) workstations where
> InterBase/Firebird exhibit the very same behaviour : when a client
> application connects to a database, there is a loooong pause (in the
> order of 10 to 30 seconds !) before it succeeds. After that, for as
> long as the database connection is kept open, everything runs fine.

System File Protection again? Are you measuring real TCP connections or
local connections, using memory-mapped files through IPC in Windows?

> I use only tcp/ip kind connections.

Then I'm inclined to think that you're exercising really the
syntax. Just trying to be sure.

> And yes there have been much
> changes in the Winsock stack. Is the GDS32.DLL linked against
> Winsock 1 or Winsock 2 libraries ? If Windock 1, it may well be the
> problem. The compatibility layer of XP to allow Winsock 1
> applications to run de-stabilize more than one application.

For what I see from the makefiles, we are linking against
and in the "remote" directory, the file inet.c has a function named
that does this:

#ifdef WIN_NT
if (!INET_initialized)
WORD version;

version = MAKEWORD (1, 1);
if (WSAStartup (version, &INET_wsadata))

We also seem to be including winsock.h only.

According to my MS Platform SDK, we should include
winsock2.h instead, do
version = MAKEWORD( 2, 2 ); instead
and link to Ws2_32.lib instead.

Better, we could do
that ensures latest version is set depending on the header. I can see
winsock2.h both in the include dir of MSVC 6.0 and in the include dir of the
classic BC++ 5.02 (circa 1997), too and I remember I used it a couple of
years ago, so v2 is not a W2K thing, but the thing we should be using now.

Hmmm, who said we are outdated? :-)
Someone sporting the precision of a surgeon should fix the relevant places.
I don't volunteer.

Claudio Valderrama C. - -
Independent developer
Owner of the Interbase® WebRing