I'm sure you're all dying to know what the problem was... NOT. But if anyone has faced comms problems, I feel this is important.
Under Win95 / Win98 (and I assume WinME), when you opened a port, everything (all settings in the DCB) started at defaults. Thus, you could always rely on the starting point and only needed to set those parameters that you knew were going to be different (baud rate, parity, etc.). Under Win2K and WinXP, this is no longer the case; the system REMEMBERS settings that have been made to a port even if those settings were put in place by another program at another moment in time. Ports retain their settings (all of them) until someone else changes them (or you reboot the PC, when they HAVE to be reinitialised). This means that if another program uses a not-so-common setting and you don't realise and set it to what you want, you end up with failing comms due to this retention. I already knew about this (discovered earlier this year), and tried to cater for it by setting more of the parameters I thought would affect what I was doing... but clearly that wasn't enough, and this "other device"'s own comms program was using something I wasn't expecting (probably some sort of flow control or handshaking). THAT is why it always worked with that device, because the setting was suitable for it, but not for ours. The moral of this tale is this: when you open a port and set parameters in the DCB structure, set EVERYTHING that you're allowed to (a couple of parameters must not be touched according to the docs). Hope that helps someone else get out of a bad situation. -- Jason Teagle [EMAIL PROTECTED]
