We're trying to determine the cause of a bunch of timeouts when talking to a device (yes, yet another comms problem landed in my lap). We're using CreateFile(), WriteFile() and ReadFile() as usual for doing the comms. Here, the original coder chose to use ReadFile() with timeouts to receive one byte at a time until it was deemed that the Modbus message is complete.
Now, this method isn't flawed or anything; it works well. The problem is these timeouts - it may simply be the device not responding, but I was trying to use GetLastError() to find out a bit more about what happened - just in case ReadFile() is failing for some reason OTHER than a timeout. It returns the message in the subject line. Does this have any special meaning for comms, or is it just the bog standard message for a ReadFile() failure for any form of data transfer, be it file, pipe, mailslot, comms, direct disk access, etc.? I had hoped to see something like "Timeout" but I guess ReadFile() is trying to behave transparently (generically) to what it's actually reading... -- Jason Teagle [EMAIL PROTECTED]
