I think I found a bug in the ANT dll. In the ant.cpp file, in the MessageThread(void *pvParameter_) function, there is an if statement that determines whether or not SerialHaveMessage() will execute:
if (usSize != 0 && usSize != DSI_FRAMER_ERROR)
{
SerialHaveMessage(stMessage, usSize);
}
In the current code, usSize is checked against 0 and DSI_FRAMER_ERROR, which is 65535. We've found, though, that usSize can also have a value of DSI_FRAMER_TIMEDOUT, or 65534. If this case is not also handled and discarded, then the subsequent SerialHaveMessage() function will do a memcpy of 65534 bytes, which causes a crash on our systems every time.
I updated and recompiled the dll with this new if statement and everything seemed to function normally now:
if (usSize != 0 && usSize != DSI_FRAMER_TIMEDOUT && usSize != DSI_FRAMER_ERROR)
Peter