This note describes a bug in Winsock 2 that causes channel access
to not work properly on Windows 95.
Windows NT and Windows 95 comprise the 32-bit application
programming interface (API) known as WIN32 which is for Intel (and
some other) computers. The API for these two platforms only differs
in a few function calls, so it is posssible to make programs that run
unmodified on both of these systems. Channel Access (CA) is developed
by Jeff Hill on a Windows NT machine and tends to runs well on NT.
There have been problems with Windows 95 that have not been well
quantified, and there have even been conjectures that CA doesn't work
for Windows 95.
I have used CA on Windows 95 to a considerable extent and have
found that it can be made to work. There is one significant problem
that causes it to not work well and appear to be flakey. This is
owing to a bug in the Windows 95 implementation of Winsock 2 in some
versions. It is the purpose of this note to describe the problem and
how to avoid it.
The problem is caused by an improper implementation in Winsock 2
of the select() call. This is the function that looks to see if there
is activity on any of the sockets attached to CA. Normally, it checks
and returns immediately (1 ms or so). In a version of Winsock 2 that
has been heavily distributed, it does not return for .5 s if there is
no input and waits until there is input otherwise, neither of which is
immediate. Since CA checks frequently, this can tend to leave the
program no time to do what else it is supposed to do.
There are two parts to Winsock, the API and the service provider
(SP). The API is what is used to build CA. The SP is the part that
is installed on Windows. Windows NT typically comes with the Winsock
2 SP installed, but Windows 95 comes with Winsock 1.1. CA appears to
run all right with Winsock 1.1. This version does not have the bug
described above. Versions of CA through R3.13.0.beta11 were built
with the Winsock 1 API. These versions can become flakey when Winsock
2 is installed. The next versions of CA will use the Winsock 2 API
and will require Winsock 2 to be installed as the service provider.
Moreover, Microsoft is recommending that Windows 95 be upgraded to
Winsock 2 because of security problems with Winsock 1. The versions
of CA built with the Winsock 2 API also may not work with the Winsock
2 SP installed, (because the bug is in Winsock 2, not CA).
There is now a version of Winsock 2 that does not have the bug.
However, the buggy version has been widely distributed and is still
being distributed from the Microsoft site and other places. In
particular, the Java JDK 1.1.5 from Sun asks to install Winsock 2. It
installs the buggy version. The Winsock 2 software development kit
(SDK) itself has an installation program, ws2setup.exe, that installs
the buggy version.
You can get a version of ws2setup.exe without the bug at:
http://www.microsoft.com/windows95/info/ws2.htm.
Among other things, ws2setup.exe installs the file, ws2_32.dll in
the WINDOWS\SYSTEM directory. If you do not have this file, you do
not have Winsock 2. You can check the version of this file to see if
you have the buggy version or not. One way is to right click on the
file in Explorer and look at Properties. The common buggy version is
4.10.1511. Version 4.10.1656 appears to be all right. Presumably
versions later than this will also not have the described bug.
Note that your previous Winsock 1 version is saved by
ws2setup.exe in the WINDOWS\ws2bakup directory, and there is a file
ws2bakup.bat that you can run to restore the 1.1 version.
-Ken
- Navigate by Date:
- Prev:
Rs232 Mauro Giacchini
- Next:
Channel Access with Java on Solaris Ken Evans
- Index:
1994
1995
1996
1997
<1998>
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Rs232 Mauro Giacchini
- Next:
Channel Access with Java on Solaris Ken Evans
- Index:
1994
1995
1996
1997
<1998>
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|